Skip to content
This repository was archived by the owner on Dec 15, 2025. It is now read-only.

Commit f5edf56

Browse files
committed
gofmt
1 parent c3f5a2c commit f5edf56

25 files changed

+43
-47
lines changed

example_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,4 @@ func ExampleOneLine() {
9494
fmt.Printf(jsoniter.Get(val, "Colors", 0).ToString())
9595
// Output:
9696
// Crimson
97-
}
97+
}

feature_adapter.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ func Get(data []byte, path ...interface{}) Any {
4343
return ConfigDefault.Get(data, path...)
4444
}
4545

46-
4746
// Marshal adapts to json/encoding Marshal API
4847
//
4948
// Marshal returns the JSON encoding of v, adapts to json/encoding Marshal API

feature_any.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package jsoniter
22

33
import (
44
"fmt"
5-
"reflect"
65
"io"
6+
"reflect"
77
)
88

99
type Any interface {

feature_any_array.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77

88
type arrayLazyAny struct {
99
baseAny
10-
cfg *frozenConfig
11-
buf []byte
12-
err error
10+
cfg *frozenConfig
11+
buf []byte
12+
err error
1313
}
1414

1515
func (any *arrayLazyAny) ValueType() ValueType {
@@ -175,7 +175,7 @@ func (any *arrayLazyAny) GetInterface() interface{} {
175175

176176
type arrayAny struct {
177177
baseAny
178-
val reflect.Value
178+
val reflect.Value
179179
}
180180

181181
func wrapArray(val interface{}) *arrayAny {

feature_any_float.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"strconv"
55
)
66

7-
87
type floatAny struct {
98
baseAny
109
val float64

feature_any_number.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66

77
type numberLazyAny struct {
88
baseAny
9-
cfg *frozenConfig
10-
buf []byte
11-
err error
9+
cfg *frozenConfig
10+
buf []byte
11+
err error
1212
}
1313

1414
func (any *numberLazyAny) ValueType() ValueType {
@@ -103,4 +103,4 @@ func (any *numberLazyAny) GetInterface() interface{} {
103103
iter := any.cfg.BorrowIterator(any.buf)
104104
defer any.cfg.ReturnIterator(iter)
105105
return iter.Read()
106-
}
106+
}

feature_any_object.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func (any *objectLazyAny) Size() int {
158158
defer any.cfg.ReturnIterator(iter)
159159
iter.ReadObjectCB(func(iter *Iterator, field string) bool {
160160
iter.Skip()
161-
size ++
161+
size++
162162
return true
163163
})
164164
return size
@@ -187,8 +187,8 @@ func (any *objectLazyAny) GetInterface() interface{} {
187187

188188
type objectAny struct {
189189
baseAny
190-
err error
191-
val reflect.Value
190+
err error
191+
val reflect.Value
192192
}
193193

194194
func wrapStruct(val interface{}) *objectAny {
@@ -342,8 +342,8 @@ func (any *objectAny) GetInterface() interface{} {
342342

343343
type mapAny struct {
344344
baseAny
345-
err error
346-
val reflect.Value
345+
err error
346+
val reflect.Value
347347
}
348348

349349
func wrapMap(val interface{}) *mapAny {

feature_any_string.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package jsoniter
22

33
import (
4-
"strconv"
54
"fmt"
5+
"strconv"
66
)
77

88
type stringAny struct {

feature_config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package jsoniter
22

33
import (
4+
"encoding/json"
45
"errors"
56
"io"
67
"reflect"
78
"sync/atomic"
89
"unsafe"
9-
"encoding/json"
1010
)
1111

1212
type Config struct {

feature_iter.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ func init() {
6565

6666
// Iterator is a fast and flexible JSON parser
6767
type Iterator struct {
68-
cfg *frozenConfig
69-
reader io.Reader
70-
buf []byte
71-
head int
72-
tail int
68+
cfg *frozenConfig
69+
reader io.Reader
70+
buf []byte
71+
head int
72+
tail int
7373
captureStartedAt int
74-
captured []byte
75-
Error error
74+
captured []byte
75+
Error error
7676
}
7777

7878
// Create creates an empty Iterator instance

0 commit comments

Comments
 (0)