mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
d5fe73393c
commit
03ac39ce5e
9 changed files with 6 additions and 84 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue