diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-10-23 23:18:24 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-10-24 00:12:32 +0200 |
commit | 889aca054a267506a1c7cfaa3992d324764d6358 (patch) | |
tree | 78483e4755ea4a27d77acb1eacb4e66dac8b3b54 /hugolib | |
parent | e3ed4a83b8e92ce9bf070f7b41780798b006e848 (diff) |
Run gofmt -s
Diffstat (limited to 'hugolib')
-rw-r--r-- | hugolib/config.go | 4 | ||||
-rw-r--r-- | hugolib/pagemeta/page_frontmatter.go | 8 | ||||
-rw-r--r-- | hugolib/site_output.go | 18 | ||||
-rw-r--r-- | hugolib/testhelpers_test.go | 2 |
4 files changed, 15 insertions, 17 deletions
diff --git a/hugolib/config.go b/hugolib/config.go index 32fa2dfca..ec7deb2de 100644 --- a/hugolib/config.go +++ b/hugolib/config.go @@ -346,12 +346,12 @@ func applyThemeConfig(v1 *viper.Viper, theme paths.ThemeConfig) error { // Only add params and new menu entries, we do not add language definitions. if v1.IsSet(languagesKey) && v2.IsSet(languagesKey) { v1Langs := v1.GetStringMap(languagesKey) - for k, _ := range v1Langs { + for k := range v1Langs { langParamsKey := languagesKey + "." + k + "." + paramsKey mergeStringMapKeepLeft(paramsKey, langParamsKey, v1, v2) } v2Langs := v2.GetStringMap(languagesKey) - for k, _ := range v2Langs { + for k := range v2Langs { if k == "" { continue } diff --git a/hugolib/pagemeta/page_frontmatter.go b/hugolib/pagemeta/page_frontmatter.go index f75613e80..b67ffbc05 100644 --- a/hugolib/pagemeta/page_frontmatter.go +++ b/hugolib/pagemeta/page_frontmatter.go @@ -71,10 +71,10 @@ type FrontMatterDescriptor struct { var ( dateFieldAliases = map[string][]string{ - fmDate: []string{}, - fmLastmod: []string{"modified"}, - fmPubDate: []string{"pubdate", "published"}, - fmExpiryDate: []string{"unpublishdate"}, + fmDate: {}, + fmLastmod: {"modified"}, + fmPubDate: {"pubdate", "published"}, + fmExpiryDate: {"unpublishdate"}, } ) diff --git a/hugolib/site_output.go b/hugolib/site_output.go index 0e0fe76a7..0a7513961 100644 --- a/hugolib/site_output.go +++ b/hugolib/site_output.go @@ -28,16 +28,16 @@ func createDefaultOutputFormats(allFormats output.Formats, cfg config.Provider) sitemapOut, _ := allFormats.GetByName(output.SitemapFormat.Name) return map[string]output.Formats{ - KindPage: output.Formats{htmlOut}, - KindHome: output.Formats{htmlOut, rssOut}, - KindSection: output.Formats{htmlOut, rssOut}, - KindTaxonomy: output.Formats{htmlOut, rssOut}, - KindTaxonomyTerm: output.Formats{htmlOut, rssOut}, + KindPage: {htmlOut}, + KindHome: {htmlOut, rssOut}, + KindSection: {htmlOut, rssOut}, + KindTaxonomy: {htmlOut, rssOut}, + KindTaxonomyTerm: {htmlOut, rssOut}, // Below are for conistency. They are currently not used during rendering. - kindRSS: output.Formats{rssOut}, - kindSitemap: output.Formats{sitemapOut}, - kindRobotsTXT: output.Formats{robotsOut}, - kind404: output.Formats{htmlOut}, + kindRSS: {rssOut}, + kindSitemap: {sitemapOut}, + kindRobotsTXT: {robotsOut}, + kind404: {htmlOut}, } } diff --git a/hugolib/testhelpers_test.go b/hugolib/testhelpers_test.go index d37d83ed3..469cfeb4a 100644 --- a/hugolib/testhelpers_test.go +++ b/hugolib/testhelpers_test.go @@ -31,8 +31,6 @@ import ( "github.com/stretchr/testify/require" ) -const () - type sitesBuilder struct { Cfg config.Provider Fs *hugofs.Fs |