blob: 349d8d2e460a91d45aa460905d429e6db6ddf813 [file] [log] [blame]
package common
import yaml "gopkg.in/yaml.v2"
// TrustedMarshalYAML marshal yaml without error returned, if an error happens it panics
func TrustedMarshalYAML(d interface{}) string {
s, err := yaml.Marshal(d)
if err != nil {
panic(err)
}
return string(s)
}