Reviewers: mp+86592_code.launchpad.net,
Message: Please take a look.
Description:
https://code.launchpad.net/~niemeyer/goyaml/scalar-skipping/+merge/86592
(do not edit description out of merge proposal)
Please review this at https://codereview.appspot.com/5505058/
Affected files: M decode.go M decode_test.go
Index: decode.go === <email address hidden> > <email address hidden> === modified file 'decode.go' --- decode.go 2011-12-20 13:36:25 +0000 +++ decode.go 2011-12-21 17:47:08 +0000 @@ -360,8 +360,6 @@ out.Set(reflect.Zero(out.Type())) good = true } - default: - panic("Can't handle type yet: " + out.Type().String()) } return good }
Index: decode_test.go === <email address hidden> > <email address hidden> === modified file 'decode_test.go' --- decode_test.go 2011-12-20 13:42:58 +0000 +++ decode_test.go 2011-12-21 17:47:08 +0000 @@ -85,6 +85,7 @@ {"a: {b: c}", &struct{ A *struct{ B string } }{&struct{ B string }{"c"}}}, {"a: {b: c}", &struct{ A map[string]string }{map[string]string{"b": "c"}}}, {"a: {b: c}", &struct{ A *map[string]string }{&map[string]string{"b": "c"}}}, + {"a:", &struct{ A map[string]string }{}}, {"a: 1", &struct{ A int }{1}}, {"a: [1, 2]", &struct{ A []int }{[]int{1, 2}}}, {"a: 1", &struct{ B int }{0}},
« Back to merge proposal
Reviewers: mp+86592_ code.launchpad. net,
Message:
Please take a look.
Description:
https:/ /code.launchpad .net/~niemeyer/ goyaml/ scalar- skipping/ +merge/ 86592
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/5505058/
Affected files:
M decode.go
M decode_test.go
Index: decode.go Set(reflect. Zero(out. Type()) ) ).String( ))
=== <email address hidden> >
<email address hidden>
=== modified file 'decode.go'
--- decode.go 2011-12-20 13:36:25 +0000
+++ decode.go 2011-12-21 17:47:08 +0000
@@ -360,8 +360,6 @@
out.
good = true
}
- default:
- panic("Can't handle type yet: " + out.Type(
}
return good
}
Index: decode_test.go string{ "b": "c"}}}, string] string{ "b": "c"}}},
=== <email address hidden> >
<email address hidden>
=== modified file 'decode_test.go'
--- decode_test.go 2011-12-20 13:42:58 +0000
+++ decode_test.go 2011-12-21 17:47:08 +0000
@@ -85,6 +85,7 @@
{"a: {b: c}", &struct{ A *struct{ B string } }{&struct{ B string }{"c"}}},
{"a: {b: c}", &struct{ A map[string]string
}{map[string]
{"a: {b: c}", &struct{ A *map[string]string
}{&map[
+ {"a:", &struct{ A map[string]string }{}},
{"a: 1", &struct{ A int }{1}},
{"a: [1, 2]", &struct{ A []int }{[]int{1, 2}}},
{"a: 1", &struct{ B int }{0}},