output: Add some sane defaults for output format

Fixes #3290
This commit is contained in:
Bjørn Erik Pedersen 2017-04-07 10:43:48 +02:00
parent 260b55ea56
commit af99a59021

View file

@ -241,6 +241,14 @@ func DecodeFormats(mediaTypes media.Types, maps ...map[string]interface{}) (Form
return f, err return f, err
} }
// We need values for these
if newOutFormat.BaseName == "" {
newOutFormat.BaseName = "index"
}
if newOutFormat.Rel == "" {
newOutFormat.Rel = "alternate"
}
f = append(f, newOutFormat) f = append(f, newOutFormat)
} }
} }