diff options
author | Cameron Moore <[email protected]> | 2018-09-06 20:40:37 -0500 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2018-09-07 08:25:51 +0200 |
commit | 30bc4ed0a01f965cc2f9187ccb6ab5d28a3149f6 (patch) | |
tree | ec739b714ea03de1f1d9d519feb3f0b1ac94548d /output | |
parent | f6f22ad944a1c308fd823792b2fbff1504f42cef (diff) | |
download | hugo-30bc4ed0a01f965cc2f9187ccb6ab5d28a3149f6.tar.gz hugo-30bc4ed0a01f965cc2f9187ccb6ab5d28a3149f6.zip |
Improve some godoc comments
Diffstat (limited to 'output')
-rw-r--r-- | output/outputFormat.go | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/output/outputFormat.go b/output/outputFormat.go index ec1838b39..9b1f83854 100644 --- a/output/outputFormat.go +++ b/output/outputFormat.go @@ -331,19 +331,20 @@ func decode(mediaTypes media.Types, input, output interface{}) error { return decoder.Decode(input) } -// BaseFilename returns the base filename of formats. -func (formats Format) BaseFilename() string { - return formats.BaseName + formats.MediaType.FullSuffix() +// BaseFilename returns the base filename of f including an extension (ie. +// "index.xml"). +func (f Format) BaseFilename() string { + return f.BaseName + f.MediaType.FullSuffix() } -// MarshalJSON returns the JSON encoding of formats. -func (formats Format) MarshalJSON() ([]byte, error) { +// MarshalJSON returns the JSON encoding of f. +func (f Format) MarshalJSON() ([]byte, error) { type Alias Format return json.Marshal(&struct { MediaType string Alias }{ - MediaType: formats.MediaType.String(), - Alias: (Alias)(formats), + MediaType: f.MediaType.String(), + Alias: (Alias)(f), }) } |