Closed mwpcheung closed 4 years ago
import ( "log" "testing" dhplist "howett.net/plist" ) type ObjectInfo struct { ID [12]byte } func TestMarshal(t *testing.T) { var Object ObjectInfo body, err := dhplist.MarshalIndent(&Object, dhplist.XMLFormat, "") if err != nil { log.Printf("error %+v", err) t.Error("error marshal") } else { log.Printf("body %s", body) } }
test result error reflect: call of reflect.Value.Bytes on array Value --- FAIL: TestMarshal (0.00s) app_test.go:19: error marshal
Good find, thanks!
Enjoy! I added some test coverage for this as well. :smile:
test result error reflect: call of reflect.Value.Bytes on array Value --- FAIL: TestMarshal (0.00s) app_test.go:19: error marshal