compose-go icon indicating copy to clipboard operation
compose-go copied to clipboard

Allow `loader.ParseYAML` and `loader.Load` to use strict YAML unmarshalling

Open OrBin opened this issue 3 years ago • 0 comments

loader.ParseYAML (and correspondingly loader.Load) use yaml.Unmarshal, which performs non-strict YAML unmarshalling (in yaml.v2 package), while in some cases a caller would like to perform strict YAML unmarshalling (e.g. to avoid duplicate keys in a map).

Would it be possible to add a strict boolean parameter to loader.ParseYAML and add a corresponding option to loader.Load and loader.parseConfig? I'm willing to do this myself, if possible.

OrBin avatar Jan 19 '22 17:01 OrBin