You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-08-07 21:52:55 +02:00
gofmt
This commit is contained in:
@ -60,4 +60,4 @@ func init() {
|
||||
}
|
||||
|
||||
type structEmpty struct{}
|
||||
type arrayAlis [4]stringAlias
|
||||
type arrayAlis [4]stringAlias
|
||||
|
@ -1,8 +1,8 @@
|
||||
package test
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"encoding"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -26,7 +26,6 @@ func (k *stringKeyType) UnmarshalText(text []byte) error {
|
||||
var _ encoding.TextMarshaler = stringKeyType("")
|
||||
var _ encoding.TextUnmarshaler = new(stringKeyType)
|
||||
|
||||
|
||||
type structKeyType struct {
|
||||
X string
|
||||
}
|
||||
@ -41,4 +40,4 @@ func (k *structKeyType) UnmarshalText(text []byte) error {
|
||||
}
|
||||
|
||||
var _ encoding.TextMarshaler = structKeyType{}
|
||||
var _ encoding.TextUnmarshaler = &structKeyType{}
|
||||
var _ encoding.TextUnmarshaler = &structKeyType{}
|
||||
|
@ -3,8 +3,8 @@ package test
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/base64"
|
||||
"strings"
|
||||
"encoding/json"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type StringMarshaler string
|
||||
@ -49,4 +49,4 @@ var _ json.Unmarshaler = new(StringMarshaler)
|
||||
|
||||
func init() {
|
||||
testCases = append(testCases, (*StringMarshaler)(nil))
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
package test
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"encoding/base64"
|
||||
"bytes"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type structMarshaler struct {
|
||||
|
@ -91,7 +91,6 @@ func (p *jsonMarshaler) UnmarshalJSON(input []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
type jsonMarshalerMap map[int]int
|
||||
|
||||
func (p *jsonMarshalerMap) MarshalJSON() ([]byte, error) {
|
||||
@ -117,11 +116,10 @@ func (p *textMarshaler) UnmarshalText(input []byte) error {
|
||||
|
||||
type textMarshalerMap map[int]int
|
||||
|
||||
|
||||
func (p *textMarshalerMap) MarshalText() ([]byte, error) {
|
||||
return []byte(`{}`), nil
|
||||
}
|
||||
|
||||
func (p *textMarshalerMap) UnmarshalText(input []byte) error {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
@ -230,4 +230,4 @@ type EmbeddedPtrOption struct {
|
||||
|
||||
type EmbeddedPtr struct {
|
||||
EmbeddedPtrOption `json:","`
|
||||
}
|
||||
}
|
||||
|
@ -192,12 +192,12 @@ type StringFieldNameE struct {
|
||||
}
|
||||
|
||||
type StringFieldName struct {
|
||||
F1 string `json:"F1"`
|
||||
F2 string `json:"f2"`
|
||||
F3 string `json:"-"`
|
||||
F4 string `json:"-,"`
|
||||
F5 string `json:","`
|
||||
F6 string `json:""`
|
||||
F1 string `json:"F1"`
|
||||
F2 string `json:"f2"`
|
||||
F3 string `json:"-"`
|
||||
F4 string `json:"-,"`
|
||||
F5 string `json:","`
|
||||
F6 string `json:""`
|
||||
StringFieldNameE `json:"e"`
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
package test
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"encoding"
|
||||
"bytes"
|
||||
"encoding"
|
||||
"encoding/base64"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -2,9 +2,9 @@ package test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding"
|
||||
"encoding/base64"
|
||||
"strings"
|
||||
"encoding"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -66,4 +66,4 @@ func (m *structTextMarshaler) UnmarshalText(text []byte) error {
|
||||
var _ encoding.TextMarshaler = structTextMarshaler{}
|
||||
var _ encoding.TextUnmarshaler = &structTextMarshaler{}
|
||||
|
||||
type structTextMarshalerAlias structTextMarshaler
|
||||
type structTextMarshalerAlias structTextMarshaler
|
||||
|
@ -1,15 +1,15 @@
|
||||
package test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"reflect"
|
||||
"fmt"
|
||||
"github.com/google/gofuzz"
|
||||
"strings"
|
||||
"github.com/json-iterator/go"
|
||||
"encoding/json"
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/google/gofuzz"
|
||||
"github.com/json-iterator/go"
|
||||
"reflect"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
var testCases []interface{}
|
||||
|
Reference in New Issue
Block a user