mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
remove sonic which only works on AMD64
Former-commit-id: 5073957b4706b68896006ee0f7bc30e49ff72c3b
This commit is contained in:
@ -8,7 +8,7 @@ import (
|
||||
"reflect"
|
||||
"sync"
|
||||
|
||||
"github.com/bytedance/sonic"
|
||||
"github.com/goccy/go-json"
|
||||
|
||||
"github.com/barkimedes/go-deepcopy"
|
||||
)
|
||||
@ -369,7 +369,8 @@ func AtomicCounter(initial ...int) func() int {
|
||||
// It takes a bytes.Buffer as a buffer and an interface{} as i.
|
||||
// Returns an error.
|
||||
func JsonMarshalByteBuffer(buffer *bytes.Buffer, i interface{}) error {
|
||||
encoder := sonic.ConfigDefault.NewEncoder(buffer)
|
||||
encoder := json.NewEncoder(buffer)
|
||||
encoder.SetEscapeHTML(false)
|
||||
err := encoder.Encode(i)
|
||||
b := buffer.Bytes()
|
||||
b = bytes.TrimRight(b, "\n")
|
||||
|
Reference in New Issue
Block a user