diff options
author | Albert Nigmatzianov <albertnigma@gmail.com> | 2016-10-24 20:56:00 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-10-24 20:56:00 +0200 |
commit | f21e2f25c99c547a2f35d209935f8f1c52fa2671 (patch) | |
tree | f2bb860213e88b0244c31144cfcd872665096f06 /create/content.go | |
parent | d9f54a13c14f12ccc8af33e9dbd611c2cd113324 (diff) |
all: Unify case of config variable names
All config variables starts with low-case and uses camelCase.
If there is abbreviation at the beginning of the name, the whole
abbreviation will be written in low-case.
If there is abbreviation at the end of the name, the
whole abbreviation will be written in upper-case.
For example, rssURI.
Diffstat (limited to 'create/content.go')
-rw-r--r-- | create/content.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/create/content.go b/create/content.go index 0daebc3ad..fb9ef7a04 100644 --- a/create/content.go +++ b/create/content.go @@ -67,7 +67,7 @@ func NewContent(fs afero.Fs, kind, name string) (err error) { return err } - if err = page.SetSourceMetaData(metadata, parser.FormatToLeadRune(viper.GetString("MetaDataFormat"))); err != nil { + if err = page.SetSourceMetaData(metadata, parser.FormatToLeadRune(viper.GetString("metaDataFormat"))); err != nil { return } @@ -78,7 +78,7 @@ func NewContent(fs afero.Fs, kind, name string) (err error) { } jww.FEEDBACK.Println(helpers.AbsPathify(filepath.Join(viper.GetString("contentDir"), name)), "created") - editor := viper.GetString("NewContentEditor") + editor := viper.GetString("newContentEditor") if editor != "" { jww.FEEDBACK.Printf("Editing %s with %q ...\n", name, editor) @@ -137,7 +137,7 @@ func createMetadata(archetype parser.Page, name string) (map[string]interface{}, metadata["title"] = helpers.MakeTitle(helpers.Filename(name)) } - if x := parser.FormatSanitize(viper.GetString("MetaDataFormat")); x == "json" || x == "yaml" || x == "toml" { + if x := parser.FormatSanitize(viper.GetString("metaDataFormat")); x == "json" || x == "yaml" || x == "toml" { metadata["date"] = time.Now().Format(time.RFC3339) } |