1 package test 2 3 func init() { 4 two := float64(2) 5 marshalCases = append(marshalCases, 6 [1]*float64{nil}, 7 [1]*float64{&two}, 8 [2]*float64{}, 9 ) 10 unmarshalCases = append(unmarshalCases, unmarshalCase{ 11 ptr: (*[0]int)(nil), 12 input: `[1]`, 13 }, unmarshalCase{ 14 ptr: (*[1]int)(nil), 15 input: `[2]`, 16 }, unmarshalCase{ 17 ptr: (*[1]int)(nil), 18 input: `[]`, 19 }) 20 } 21