ax(mining): rename enc to encoder in MarshalJSON for AX Principle 1
Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
9f510aea98
commit
95d62c11cf
1 changed files with 3 additions and 3 deletions
|
|
@ -35,10 +35,10 @@ func MarshalJSON(v interface{}) ([]byte, error) {
|
|||
buf := getBuffer()
|
||||
defer putBuffer(buf)
|
||||
|
||||
enc := json.NewEncoder(buf)
|
||||
encoder := json.NewEncoder(buf)
|
||||
// Don't escape HTML characters (matches json.Marshal behavior for these use cases)
|
||||
enc.SetEscapeHTML(false)
|
||||
if err := enc.Encode(v); err != nil {
|
||||
encoder.SetEscapeHTML(false)
|
||||
if err := encoder.Encode(v); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue