diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/config.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/config/config.go b/config/config.go index bbb327c..141cb39 100644 --- a/config/config.go +++ b/config/config.go @@ -18,10 +18,8 @@ type config struct { SingleInstance string StaticDirectory string TemplatesPath string - DatabasePath string CustomCSS string PostFormats []model.PostFormat - LogFile string } func (c *config) IsValid() bool { @@ -30,8 +28,7 @@ func (c *config) IsValid() bool { len(c.ClientScope) < 1 || len(c.ClientWebsite) < 1 || len(c.StaticDirectory) < 1 || - len(c.TemplatesPath) < 1 || - len(c.DatabasePath) < 1 { + len(c.TemplatesPath) < 1 { return false } return true @@ -75,10 +72,10 @@ func Parse(r io.Reader) (c *config, err error) { c.StaticDirectory = val case "templates_path": c.TemplatesPath = val - case "database_path": - c.DatabasePath = val case "custom_css": c.CustomCSS = val + case "database_path": + // ignore case "post_formats": vals := strings.Split(val, ",") var formats []model.PostFormat @@ -99,7 +96,7 @@ func Parse(r io.Reader) (c *config, err error) { } c.PostFormats = formats case "log_file": - c.LogFile = val + // ignore default: return nil, errors.New("invalid config key " + key) } |