Output the difference of struct to map
go get github.com/KenjiHosaka/gomaf
oldVal := struct {
Name string `gomaf:"name"`
Age int `gomaf:"age"`
}{
Name: "gomaf",
Age: 20,
}
newVal := struct {
Name string `gomaf:"name"`
Age int `gomaf:"age"`
}{
Name: "",
Age: 20,
}
result, err := Diff(oldVal, newVal)
// result: {"name":""}