summaryrefslogtreecommitdiff
path: root/src/encoding/json/decode_test.go
diff options
context:
space:
mode:
authorDaniel Martí <mvdan@mvdan.cc>2019-09-02 14:17:23 +0200
committerDaniel Martí <mvdan@mvdan.cc>2019-09-02 12:57:37 +0000
commit03ac39ce5e6af4c4bca58b54d5b160a154b7aa0e (patch)
treee40846ac626b4be09b8ff5bf6e3ffab9cb3e36bc /src/encoding/json/decode_test.go
parentd5fe73393c40c7b4070aa73903671c8d1f23f2c2 (diff)
downloadgo-git-03ac39ce5e6af4c4bca58b54d5b160a154b7aa0e.tar.gz
std: remove unused bits of code all over the place
Some were never used, and some haven't been used for years. One exception is net/http's readerAndCloser, which was only used in a test. Move it to a test file. While at it, remove a check in regexp that could never fire; the field is an uint32, so it can never be negative. Change-Id: Ia2200f6afa106bae4034045ea8233b452f38747b Reviewed-on: https://go-review.googlesource.com/c/go/+/192621 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/encoding/json/decode_test.go')
-rw-r--r--src/encoding/json/decode_test.go35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/encoding/json/decode_test.go b/src/encoding/json/decode_test.go
index 31ab61c733..72d384a80f 100644
--- a/src/encoding/json/decode_test.go
+++ b/src/encoding/json/decode_test.go
@@ -1744,41 +1744,6 @@ type NullTest struct {
Struct struct{}
}
-type NullTestStrings struct {
- Bool bool `json:",string"`
- Int int `json:",string"`
- Int8 int8 `json:",string"`
- Int16 int16 `json:",string"`
- Int32 int32 `json:",string"`
- Int64 int64 `json:",string"`
- Uint uint `json:",string"`
- Uint8 uint8 `json:",string"`
- Uint16 uint16 `json:",string"`
- Uint32 uint32 `json:",string"`
- Uint64 uint64 `json:",string"`
- Float32 float32 `json:",string"`
- Float64 float64 `json:",string"`
- String string `json:",string"`
- PBool *bool `json:",string"`
- Map map[string]string `json:",string"`
- Slice []string `json:",string"`
- Interface interface{} `json:",string"`
-
- PRaw *RawMessage `json:",string"`
- PTime *time.Time `json:",string"`
- PBigInt *big.Int `json:",string"`
- PText *MustNotUnmarshalText `json:",string"`
- PBuffer *bytes.Buffer `json:",string"`
- PStruct *struct{} `json:",string"`
-
- Raw RawMessage `json:",string"`
- Time time.Time `json:",string"`
- BigInt big.Int `json:",string"`
- Text MustNotUnmarshalText `json:",string"`
- Buffer bytes.Buffer `json:",string"`
- Struct struct{} `json:",string"`
-}
-
// JSON null values should be ignored for primitives and string values instead of resulting in an error.
// Issue 2540
func TestUnmarshalNulls(t *testing.T) {