diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-05-13 12:59:10 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-05-13 12:59:10 +0300 |
| commit | 77241c7fcf156b6ebee13bf58f4342aca16292e1 (patch) | |
| tree | 337ee6f97aa752389173831736ab731b4e6808dc /util/json_util | |
| parent | fd6a85afd9d1f5700245ce152844472b1cd24923 (diff) | |
pruning some codes
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'util/json_util')
| -rw-r--r-- | util/json_util/json.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/json_util/json.go b/util/json_util/json.go index 65ad789e..54e3728a 100644 --- a/util/json_util/json.go +++ b/util/json_util/json.go @@ -6,7 +6,7 @@ import ( type RawMessage []byte -// MarshalJSON 自定义 json.RawMessage 默认行为 +// MarshalJSON: Customize json.RawMessage default behavior func (m RawMessage) MarshalJSON() ([]byte, error) { if len(m) == 0 { return []byte("null"), nil @@ -14,7 +14,7 @@ func (m RawMessage) MarshalJSON() ([]byte, error) { return m, nil } -// UnmarshalJSON sets *m to a copy of data. +// UnmarshalJSON: sets *m to a copy of data. func (m *RawMessage) UnmarshalJSON(data []byte) error { if m == nil { return errors.New("json.RawMessage: UnmarshalJSON on nil pointer") |
