Skip to content

Commit 8d9d111

Browse files
committed
Update tests
1 parent 967079c commit 8d9d111

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

cmd/goconst/main.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,11 @@ func printOutput(strs goconst.Strings, consts goconst.Constants, output string)
126126
case "json":
127127
enc := json.NewEncoder(os.Stdout)
128128
err := enc.Encode(struct {
129-
Strings goconst.Strings `json:"strings,omitempty"`
130-
Constants goconst.Constants `json:"constants,omitempty"`
129+
Strings goconst.Strings `json:"strings"`
130+
Constants goconst.Constants `json:"constants"`
131131
}{
132-
strs, consts,
132+
Strings: strs,
133+
Constants: consts,
133134
})
134135
if err != nil {
135136
return false, err

parser.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func GetStringBuffer() []string {
107107
// PutStringBuffer returns a string slice to the pool
108108
func PutStringBuffer(slice []string) {
109109
sliceCopy := make([]string, 0, cap(slice))
110-
StringBufferPool.Put(&sliceCopy)
110+
StringBufferPool.Put(sliceCopy)
111111
}
112112

113113
// GetExtendedPosBuffer retrieves an ExtendedPos slice from the pool

0 commit comments

Comments
 (0)