diff options
author | Bjørn Erik Pedersen <[email protected]> | 2017-04-03 22:39:37 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2017-04-04 15:12:30 +0200 |
commit | f8d555cca59a48df9cde2e7323ff2d500e0590a3 (patch) | |
tree | d11b02e24b1c75ad48deaf9e016a66298222d4c7 /output | |
parent | c9aee467d387c4c3489c23f120a7ef2fed4d12df (diff) | |
download | hugo-f8d555cca59a48df9cde2e7323ff2d500e0590a3.tar.gz hugo-f8d555cca59a48df9cde2e7323ff2d500e0590a3.zip |
media: Add DecodeTypes
And clean up the media package.
Diffstat (limited to 'output')
-rw-r--r-- | output/outputFormat.go | 4 | ||||
-rw-r--r-- | output/outputFormat_test.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/output/outputFormat.go b/output/outputFormat.go index 99420f720..06a82fdb7 100644 --- a/output/outputFormat.go +++ b/output/outputFormat.go @@ -216,9 +216,9 @@ func (formats Formats) FromFilename(filename string) (f Format, found bool) { return } -// DecodeOutputFormats takes a list of output format configurations and merges those, +// DecodeFormats takes a list of output format configurations and merges those, // in ther order given, with the Hugo defaults as the last resort. -func DecodeOutputFormats(mediaTypes media.Types, maps ...map[string]interface{}) (Formats, error) { +func DecodeFormats(mediaTypes media.Types, maps ...map[string]interface{}) (Formats, error) { f := make(Formats, len(DefaultFormats)) copy(f, DefaultFormats) diff --git a/output/outputFormat_test.go b/output/outputFormat_test.go index 48937a8f1..78b2a6096 100644 --- a/output/outputFormat_test.go +++ b/output/outputFormat_test.go @@ -174,7 +174,7 @@ func TestDecodeFormats(t *testing.T) { } for _, test := range tests { - result, err := DecodeOutputFormats(mediaTypes, test.maps...) + result, err := DecodeFormats(mediaTypes, test.maps...) if test.shouldError { require.Error(t, err, test.name) } else { |