slice_test.go 252 B

1234567891011121314
  1. package test
  2. func init() {
  3. nilSlice := []string(nil)
  4. marshalCases = append(marshalCases,
  5. []interface{}{"hello"},
  6. nilSlice,
  7. &nilSlice,
  8. )
  9. unmarshalCases = append(unmarshalCases, unmarshalCase{
  10. ptr: (*[]string)(nil),
  11. input: "null",
  12. })
  13. }