diff options
author | Cameron Moore <[email protected]> | 2017-09-25 21:25:33 -0500 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2017-09-29 16:23:16 +0200 |
commit | 47fdfd5196cd24a23b30afe1d88969ffb413ab59 (patch) | |
tree | e2b4dc5bb5341ab2d8588879fb733ee888b9164b /output/outputFormat.go | |
parent | d45e358a0543d987091ef54b56eadd9cebda2e0f (diff) | |
download | hugo-47fdfd5196cd24a23b30afe1d88969ffb413ab59.tar.gz hugo-47fdfd5196cd24a23b30afe1d88969ffb413ab59.zip |
Clean up lint in various packages
Changes fall into one of the following:
- gofmt -s
- receiver name is inconsistent
- omit unused 2nd value from range
- godoc comment formed incorrectly
- err assigned and not used
- if block ends with a return statement followed by else
Diffstat (limited to 'output/outputFormat.go')
-rw-r--r-- | output/outputFormat.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/output/outputFormat.go b/output/outputFormat.go index 4ccc28870..fbc9f20cc 100644 --- a/output/outputFormat.go +++ b/output/outputFormat.go @@ -150,9 +150,9 @@ func init() { type Formats []Format -func (f Formats) Len() int { return len(f) } -func (f Formats) Swap(i, j int) { f[i], f[j] = f[j], f[i] } -func (f Formats) Less(i, j int) bool { return f[i].Name < f[j].Name } +func (formats Formats) Len() int { return len(formats) } +func (formats Formats) Swap(i, j int) { formats[i], formats[j] = formats[j], formats[i] } +func (formats Formats) Less(i, j int) bool { return formats[i].Name < formats[j].Name } // GetBySuffix gets a output format given as suffix, e.g. "html". // It will return false if no format could be found, or if the suffix given @@ -312,17 +312,17 @@ func decode(mediaTypes media.Types, input, output interface{}) error { return decoder.Decode(input) } -func (f Format) BaseFilename() string { - return f.BaseName + "." + f.MediaType.Suffix +func (formats Format) BaseFilename() string { + return formats.BaseName + "." + formats.MediaType.Suffix } -func (f Format) MarshalJSON() ([]byte, error) { +func (formats Format) MarshalJSON() ([]byte, error) { type Alias Format return json.Marshal(&struct { MediaType string Alias }{ - MediaType: f.MediaType.String(), - Alias: (Alias)(f), + MediaType: formats.MediaType.String(), + Alias: (Alias)(formats), }) } |