Skip to content

Commit 36390d7

Browse files
committed
erros: fix document comment
1 parent 89df8fb commit 36390d7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

errors_gojay.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ package jsonrpc2
88

99
import "github.com/francoispqt/gojay"
1010

11-
// MarshalJSONObject implements gojay's MarshalerJSONObject
11+
// MarshalJSONObject implements gojay.MarshalerJSONObject.
1212
func (e *Error) MarshalJSONObject(enc *gojay.Encoder) {
1313
enc.IntKey(keyCode, int(e.Code))
1414
enc.StringKey(keyMessage, e.Message)
1515
}
1616

17-
// IsNil returns wether the structure is nil value or not
17+
// IsNil implements gojay.MarshalerJSONObject.
1818
func (e *Error) IsNil() bool { return e == nil }
1919

20-
// UnmarshalJSONObject implements gojay's UnmarshalerJSONObject
20+
// UnmarshalJSONObject implements gojay.UnmarshalerJSONObject.
2121
func (e *Error) UnmarshalJSONObject(dec *gojay.Decoder, k string) error {
2222
switch k {
2323
case keyCode:
@@ -28,11 +28,11 @@ func (e *Error) UnmarshalJSONObject(dec *gojay.Decoder, k string) error {
2828
return nil
2929
}
3030

31-
// NKeys returns the number of keys to unmarshal
31+
// NKeys implements gojay.UnmarshalerJSONObject.
3232
func (e *Error) NKeys() int { return 2 }
3333

34-
// compile time check whether the Error implements a gojay.MarshalerJSONObject interface.
35-
var _ gojay.MarshalerJSONObject = (*Error)(nil)
36-
37-
// compile time check whether the Error implements a gojay.UnmarshalerJSONObject interface.
38-
var _ gojay.UnmarshalerJSONObject = (*Error)(nil)
34+
// compile time check whether the Error implements a gojay.MarshalerJSONObject and gojay.UnmarshalerJSONObject interfaces.
35+
var (
36+
_ gojay.MarshalerJSONObject = (*Error)(nil)
37+
_ gojay.UnmarshalerJSONObject = (*Error)(nil)
38+
)

0 commit comments

Comments
 (0)