chore: upgrade go mod, remove json iterator dep

This commit is contained in:
moonD4rk
2022-10-30 13:37:49 +08:00
parent 7d958e36a0
commit b7cabaa7b9
3 changed files with 79 additions and 65 deletions
+2 -2
View File
@@ -2,13 +2,13 @@ package browingdata
import (
"encoding/csv"
"encoding/json"
"errors"
"io"
"os"
"path/filepath"
"github.com/gocarina/gocsv"
jsoniter "github.com/json-iterator/go"
"golang.org/x/text/encoding/unicode"
"golang.org/x/text/transform"
)
@@ -31,7 +31,7 @@ func NewOutPutter(flag string) *OutPutter {
func (o *OutPutter) Write(data Source, writer io.Writer) error {
switch o.json {
case true:
encoder := jsoniter.NewEncoder(writer)
encoder := json.NewEncoder(writer)
encoder.SetIndent(" ", " ")
encoder.SetEscapeHTML(false)
return encoder.Encode(data)