ptr_test.go 395 B

1234567891011121314151617181920
  1. package test
  2. func init() {
  3. var pEFace = func(val interface{}) *interface{} {
  4. return &val
  5. }
  6. unmarshalCases = append(unmarshalCases, unmarshalCase{
  7. ptr: (**interface{})(nil),
  8. input: `"hello"`,
  9. }, unmarshalCase{
  10. ptr: (**interface{})(nil),
  11. input: `1e1`,
  12. }, unmarshalCase{
  13. ptr: (**interface{})(nil),
  14. input: `1.0e1`,
  15. })
  16. marshalCases = append(marshalCases,
  17. pEFace("hello"),
  18. )
  19. }