mirror of https://github.com/goccy/go-json.git
Fix error by linter
This commit is contained in:
parent
98824e9bd9
commit
6575394cc0
|
@ -33,16 +33,6 @@ func makemap(*rtype, int) unsafe.Pointer
|
||||||
//go:noescape
|
//go:noescape
|
||||||
func mapassign(t *rtype, m unsafe.Pointer, key, val unsafe.Pointer)
|
func mapassign(t *rtype, m unsafe.Pointer, key, val unsafe.Pointer)
|
||||||
|
|
||||||
func (d *mapDecoder) setKey(buf []byte, cursor int64, key interface{}) (int64, error) {
|
|
||||||
header := (*interfaceHeader)(unsafe.Pointer(&key))
|
|
||||||
return d.keyDecoder.decode(buf, cursor, header.ptr)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d *mapDecoder) setValue(buf []byte, cursor int64, key interface{}) (int64, error) {
|
|
||||||
header := (*interfaceHeader)(unsafe.Pointer(&key))
|
|
||||||
return d.valueDecoder.decode(buf, cursor, header.ptr)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d *mapDecoder) decodeStream(s *stream, p unsafe.Pointer) error {
|
func (d *mapDecoder) decodeStream(s *stream, p unsafe.Pointer) error {
|
||||||
s.skipWhiteSpace()
|
s.skipWhiteSpace()
|
||||||
switch s.char() {
|
switch s.char() {
|
||||||
|
@ -136,7 +126,6 @@ func (d *mapDecoder) decode(buf []byte, cursor int64, p unsafe.Pointer) (int64,
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
cursor = keyCursor
|
|
||||||
cursor = skipWhiteSpace(buf, keyCursor)
|
cursor = skipWhiteSpace(buf, keyCursor)
|
||||||
if buf[cursor] != ':' {
|
if buf[cursor] != ':' {
|
||||||
return 0, errExpected("colon after object key", cursor)
|
return 0, errExpected("colon after object key", cursor)
|
||||||
|
@ -159,5 +148,4 @@ func (d *mapDecoder) decode(buf []byte, cursor int64, p unsafe.Pointer) (int64,
|
||||||
}
|
}
|
||||||
cursor++
|
cursor++
|
||||||
}
|
}
|
||||||
return cursor, nil
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue