From af99a59021cc1231d5afa79f4ab17d34f39260fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Fri, 7 Apr 2017 10:43:48 +0200 Subject: output: Add some sane defaults for output format Fixes #3290 --- output/outputFormat.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'output') diff --git a/output/outputFormat.go b/output/outputFormat.go index 4a95c1c70..ed3426411 100644 --- a/output/outputFormat.go +++ b/output/outputFormat.go @@ -241,6 +241,14 @@ func DecodeFormats(mediaTypes media.Types, maps ...map[string]interface{}) (Form return f, err } + // We need values for these + if newOutFormat.BaseName == "" { + newOutFormat.BaseName = "index" + } + if newOutFormat.Rel == "" { + newOutFormat.Rel = "alternate" + } + f = append(f, newOutFormat) } } -- cgit v1.2.3