Set default value of version to -1

pull/1/head v0.0.4
Stein Ivar Berghei 2021-11-21 17:38:52 +01:00
parent 4d06a3718a
commit 95e5ef613f
1 changed files with 4 additions and 0 deletions

View File

@ -122,6 +122,10 @@ func (g Guessit) Guessit(s string, options ...string) (out Match, err error) {
} }
} }
if _, ok := tmpmap["version"]; !ok {
tmpmap["version"] = -1
}
config := &mapstructure.DecoderConfig{ config := &mapstructure.DecoderConfig{
WeaklyTypedInput: true, WeaklyTypedInput: true,
Result: &out, Result: &out,