aboutsummaryrefslogtreecommitdiffhomepage
path: root/output
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2017-04-03 22:39:37 +0200
committerBjørn Erik Pedersen <[email protected]>2017-04-04 15:12:30 +0200
commitf8d555cca59a48df9cde2e7323ff2d500e0590a3 (patch)
treed11b02e24b1c75ad48deaf9e016a66298222d4c7 /output
parentc9aee467d387c4c3489c23f120a7ef2fed4d12df (diff)
downloadhugo-f8d555cca59a48df9cde2e7323ff2d500e0590a3.tar.gz
hugo-f8d555cca59a48df9cde2e7323ff2d500e0590a3.zip
media: Add DecodeTypes
And clean up the media package.
Diffstat (limited to 'output')
-rw-r--r--output/outputFormat.go4
-rw-r--r--output/outputFormat_test.go2
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 {