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:
@ -7,7 +7,7 @@ import (
|
|||||||
// TODO: The version number is extracted from git. This induces that the version
|
// TODO: The version number is extracted from git. This induces that the version
|
||||||
// corresponds to the last commit, and not the one when the file will be
|
// corresponds to the last commit, and not the one when the file will be
|
||||||
// commited
|
// commited
|
||||||
var _Commit = "c94e79b"
|
var _Commit = "ab9b472"
|
||||||
var _Version = "Release 4.2.0"
|
var _Version = "Release 4.2.0"
|
||||||
|
|
||||||
// Version returns the version of the obitools package.
|
// Version returns the version of the obitools package.
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/bytedance/sonic"
|
"github.com/goccy/go-json"
|
||||||
|
|
||||||
"github.com/barkimedes/go-deepcopy"
|
"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.
|
// It takes a bytes.Buffer as a buffer and an interface{} as i.
|
||||||
// Returns an error.
|
// Returns an error.
|
||||||
func JsonMarshalByteBuffer(buffer *bytes.Buffer, i interface{}) 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)
|
err := encoder.Encode(i)
|
||||||
b := buffer.Bytes()
|
b := buffer.Bytes()
|
||||||
b = bytes.TrimRight(b, "\n")
|
b = bytes.TrimRight(b, "\n")
|
||||||
|
Reference in New Issue
Block a user