diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-01-29 02:15:13 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-01-29 02:15:13 -0700 |
commit | 0b57145421e7e4f165f64e73ee7c5d8102945569 (patch) | |
tree | 25584309e42bb53469959a3725393bdbc8b225c7 /compat/json/compat.go | |
parent | ffee5c8516f3f55f82ed5bb8f0a4f340d485fa92 (diff) | |
parent | 7e00adcf43b18a22ffbbadc79b8681a5d871f448 (diff) |
Merge branch 'lukeshu/quality'
This branch works to improve code quality, without making any
substantive changes.
Diffstat (limited to 'compat/json/compat.go')
-rw-r--r-- | compat/json/compat.go | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/compat/json/compat.go b/compat/json/compat.go index f8b23e3..0c9e800 100644 --- a/compat/json/compat.go +++ b/compat/json/compat.go @@ -2,6 +2,8 @@ // // SPDX-License-Identifier: GPL-2.0-or-later +// Package json is a wrapper around lowmemjson that is a (mostly) +// drop-in replacement for the standard library's encoding/json. package json import ( @@ -15,23 +17,24 @@ import ( "git.lukeshu.com/go/lowmemjson" ) +//nolint:stylecheck // ST1021 False positive; these aren't comments on individual types. type ( Number = json.Number RawMessage = json.RawMessage Marshaler = json.Marshaler Unmarshaler = json.Unmarshaler - // low-level decode errors - //SyntaxError = json.SyntaxError // duplicated to access a private field + // low-level decode errors. UnmarshalTypeError = json.UnmarshalTypeError + // SyntaxError = json.SyntaxError // Duplicated to access a private field. - // high-level decode errors + // high-level decode errors. InvalidUnmarshalError = json.InvalidUnmarshalError - // marshal errors - //MarshalerError = json.MarshalerError // duplicated to access a private field + // marshal errors. UnsupportedTypeError = json.UnsupportedTypeError UnsupportedValueError = json.UnsupportedValueError + // MarshalerError = json.MarshalerError // Duplicated to access a private field. ) // Encode wrappers /////////////////////////////////////////////////// @@ -241,4 +244,4 @@ func (dec *Decoder) Buffered() io.Reader { return bytes.NewReader(dat) } -//func (dec *Decoder) Token() (Token, error) +// func (dec *Decoder) Token() (Token, error) |