You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-11-29 22:47:28 +02:00
fix golint: document exported symbols
This commit is contained in:
@@ -36,10 +36,12 @@ func decode(str string) string {
|
||||
return string(bs)
|
||||
}
|
||||
|
||||
// MarshalJSON TEST ONLY
|
||||
func (m MarshalerForTest) MarshalJSON() ([]byte, error) {
|
||||
return []byte(`"MANUAL__` + encode(string(m)) + `"`), nil
|
||||
}
|
||||
|
||||
// UnmarshalJSON TEST ONLY
|
||||
func (m *MarshalerForTest) UnmarshalJSON(text []byte) error {
|
||||
*m = MarshalerForTest(decode(strings.TrimPrefix(strings.Trim(string(text), `"`), "MANUAL__")))
|
||||
return nil
|
||||
|
||||
@@ -36,10 +36,12 @@ func decode(str string) string {
|
||||
return string(bs)
|
||||
}
|
||||
|
||||
// MarshalText TEST ONLY
|
||||
func (m MarshalerForTest) MarshalText() ([]byte, error) {
|
||||
return []byte(`MANUAL__` + encode(string(m))), nil
|
||||
}
|
||||
|
||||
// UnmarshalText TEST ONLY
|
||||
func (m *MarshalerForTest) UnmarshalText(text []byte) error {
|
||||
*m = MarshalerForTest(decode(strings.TrimPrefix(string(text), "MANUAL__")))
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user