summaryrefslogtreecommitdiff
path: root/decode.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-01-26 22:45:39 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-01-29 02:14:51 -0700
commitc14af2a4eb80811e8fb25502b4a07ad2f33804c2 (patch)
tree02c0661b262e4014dbec808d794b19660068d2fd /decode.go
parent5f6408eef2499b1ed35e215c581647d78dca1557 (diff)
.golangci.yml: Turn on formatting linters 'gci' and 'gofumpt', fix
All formatting changes are made by ./tools/bin/golangci-lint run --fix ./...
Diffstat (limited to 'decode.go')
-rw-r--r--decode.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/decode.go b/decode.go
index 5a03d5d..0b5b6cc 100644
--- a/decode.go
+++ b/decode.go
@@ -153,9 +153,11 @@ func (dec *Decoder) More() bool {
func (dec *Decoder) stackPush(par reflect.Type, idx any) {
dec.stack = append(dec.stack, decodeStackItem{par, idx})
}
+
func (dec *Decoder) stackPop() {
dec.stack = dec.stack[:len(dec.stack)-1]
}
+
func (dec *Decoder) stackStr() string {
var buf strings.Builder
buf.WriteString("v")
@@ -326,6 +328,7 @@ func (sc *decRuneTypeScanner) ReadRuneType() (rune, int, internal.RuneType, erro
}
return c, s, t, nil
}
+
func (sc *decRuneTypeScanner) ReadRune() (rune, int, error) {
r, s, t, _ := sc.ReadRuneType()
switch t {