Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/output
diff options
context:
space:
mode:
authorCameron Moore <moorereason@gmail.com>2017-09-26 05:25:33 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-09-29 17:23:16 +0300
commit47fdfd5196cd24a23b30afe1d88969ffb413ab59 (patch)
treee2b4dc5bb5341ab2d8588879fb733ee888b9164b /output
parentd45e358a0543d987091ef54b56eadd9cebda2e0f (diff)
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')
-rw-r--r--output/outputFormat.go16
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),
})
}