Found a total of 1 related content
golang yaml marshal url
Article Introduction:I'm trying to use a config file with a url field and I want to marshal and unmarshal this type. The documentation states that I can perform a custom marshalling function. In this golang playground, you can see that the custom unmarshal function works fine, but the custom marshal function does not: typeYAMLURLstruct{*url.URL}func(j*YAMLURL)UnmarshalYAML(unmarshalfunc(interface{})error)error {fmt.Println("customun
2024-02-10
comment
304