var c struct {Name string}b := []byte(`Name: Alice`)UnmarshalYamlBytes(b, &c)
func UnmarshalYamlBytes(c []byte, v any) error { decoder := yaml.NewDecoder(bytes.NewReader(content)) if err := decoder.Decode(&v); err != nil { return err }}
I tried:
func UnmarshalYamlBytes(c []byte, v any) error { ... ...Decode(v)... ... ...}it's not working
Modify the value of the parameter without changing the parameter's address
How should I do?