Skip to content

Commit

Permalink
Replace "encoding/json" with "github.com/getevo/json" across the project
Browse files Browse the repository at this point in the history
  • Loading branch information
iesreza committed Aug 16, 2024
1 parent d126947 commit 21a98e5
Show file tree
Hide file tree
Showing 28 changed files with 40 additions and 145 deletions.
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

2 changes: 1 addition & 1 deletion fiber.context.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package evo

import (
"encoding/base64"
"encoding/json"
"encoding/xml"
"errors"
"fmt"
"github.com/getevo/evo/v2/lib/frm"
"github.com/getevo/evo/v2/lib/generic"
"github.com/getevo/evo/v2/lib/outcome"
"github.com/getevo/json"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/utils/v2"
"github.com/tidwall/gjson"
Expand Down
14 changes: 4 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/getevo/evo/v2

go 1.19
go 1.22

toolchain go1.22.6

require (
github.com/alecthomas/repr v0.2.0
Expand All @@ -11,6 +13,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/s3 v1.33.0
github.com/fatih/structs v1.1.0
github.com/ganbarodigital/go_glob v1.0.0
github.com/getevo/json v0.0.0-20240816130540-f0ea83b195d9
github.com/go-redis/redis/v8 v8.11.5
github.com/gofiber/fiber/v2 v2.51.0
github.com/gofiber/utils/v2 v2.0.0-beta.1
Expand All @@ -24,7 +27,6 @@ require (
github.com/stretchr/testify v1.8.2
github.com/tidwall/gjson v1.7.4
github.com/valyala/fasthttp v1.50.0
go.uber.org/multierr v1.9.0
golang.org/x/crypto v0.16.0
golang.org/x/text v0.14.0
gopkg.in/yaml.v3 v3.0.1
Expand Down Expand Up @@ -52,7 +54,6 @@ require (
github.com/go-sql-driver/mysql v1.7.0 // indirect
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect
github.com/golang-sql/sqlexp v0.1.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/uuid v1.4.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
Expand All @@ -66,23 +67,16 @@ require (
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mattn/go-sqlite3 v1.14.15 // indirect
github.com/microsoft/go-mssqldb v0.19.0 // indirect
github.com/nats-io/nats-server/v2 v2.9.22 // indirect
github.com/nats-io/nkeys v0.4.6 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/philhofer/fwd v1.1.2 // indirect
github.com/pierrec/lz4/v4 v4.1.18 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/savsgio/dictpool v0.0.0-20221023140959-7bf2e61cea94 // indirect
github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d // indirect
github.com/tidwall/match v1.0.3 // indirect
github.com/tidwall/pretty v1.1.0 // indirect
github.com/tinylib/msgp v1.1.8 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/tcplisten v1.0.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
golang.org/x/sys v0.15.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
)
94 changes: 8 additions & 86 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/curl/header.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package curl

import "encoding/json"
import "github.com/getevo/json"

type BasicAuth struct {
Username string
Expand Down
2 changes: 1 addition & 1 deletion lib/curl/req.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"compress/gzip"
"context"
"encoding/base64"
"encoding/json"
"encoding/xml"
"errors"
"fmt"
"github.com/getevo/evo/v2/lib/memo"
"github.com/getevo/json"
"io"
"io/ioutil"
"mime/multipart"
Expand Down
2 changes: 1 addition & 1 deletion lib/curl/resp.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package curl

import (
"encoding/json"
"encoding/xml"
"fmt"
"github.com/getevo/json"
"io"
"net/http"
"os"
Expand Down
2 changes: 1 addition & 1 deletion lib/db/types/array.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package types

import (
"database/sql/driver"
"encoding/json"
"fmt"
"github.com/getevo/json"
"gorm.io/gorm"
"gorm.io/gorm/schema"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/db/types/date.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package types

import (
"database/sql/driver"
"encoding/json"
"errors"
"fmt"
"github.com/getevo/evo/v2/lib/date"
"github.com/getevo/json"
"strings"
"time"

Expand Down
2 changes: 1 addition & 1 deletion lib/db/types/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package types
import (
"context"
"database/sql/driver"
"encoding/json"
"errors"
"fmt"
"github.com/getevo/json"
"gorm.io/driver/mysql"
"gorm.io/gorm"
"gorm.io/gorm/clause"
Expand Down
2 changes: 1 addition & 1 deletion lib/db/types/map.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"bytes"
"context"
"database/sql/driver"
"encoding/json"
"errors"
"fmt"
"github.com/getevo/json"
"strings"

"gorm.io/driver/mysql"
Expand Down
2 changes: 1 addition & 1 deletion lib/db/types/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package types

import (
"database/sql/driver"
"encoding/json"
"errors"
"fmt"
"github.com/getevo/json"
"strings"
"time"

Expand Down
2 changes: 1 addition & 1 deletion lib/db/types/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package types

import (
"database/sql/driver"
"encoding/json"
"errors"
"fmt"
"github.com/getevo/json"
"gorm.io/gorm"
"gorm.io/gorm/schema"
"net/url"
Expand Down
2 changes: 1 addition & 1 deletion lib/frm/error.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package frm

import (
"encoding/json"
"fmt"
"github.com/getevo/json"
"strings"
)

Expand Down
2 changes: 1 addition & 1 deletion lib/generic/generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package generic

import (
"database/sql/driver"
"encoding/json"
"fmt"
"github.com/getevo/json"
"reflect"
"regexp"
"strconv"
Expand Down
2 changes: 1 addition & 1 deletion lib/gpath/file.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gpath

import (
"encoding/json"
"github.com/getevo/json"
"os"
"time"
)
Expand Down
8 changes: 4 additions & 4 deletions lib/is/is.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package is

import (
"encoding/base64"
"encoding/json"
"github.com/getevo/json"
"math"
"net"
"net/url"
Expand Down Expand Up @@ -83,8 +83,8 @@ func Alpha(s string) bool {
return true
}

//UTFLetter check if the string contains only unicode letter characters.
//Similar to IsAlpha but for all languages. Empty string is valid.
// UTFLetter check if the string contains only unicode letter characters.
// Similar to IsAlpha but for all languages. Empty string is valid.
func UTFLetter(str string) bool {
for _, v := range str {
if !unicode.IsLetter(v) {
Expand Down Expand Up @@ -614,7 +614,7 @@ func StringLength(str string, min int, max int) bool {
return slen >= min && slen <= max
}

//Exists returns whether the given file or directory exists or not
// Exists returns whether the given file or directory exists or not
func Exists(path string) (bool, error) {
_, err := os.Stat(path)
if err == nil {
Expand Down
2 changes: 1 addition & 1 deletion lib/json/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package json
import (
"context"
"database/sql/driver"
"encoding/json"
"errors"
"fmt"
"github.com/getevo/json"
"github.com/tidwall/gjson"
"io"
"reflect"
Expand Down
2 changes: 1 addition & 1 deletion lib/json/json_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"bytes"
"context"
"database/sql/driver"
"encoding/json"
"errors"
"fmt"
"github.com/getevo/json"
"github.com/tidwall/gjson"
"strings"

Expand Down
2 changes: 1 addition & 1 deletion lib/log/log.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package log

import (
"encoding/json"
"fmt"
"github.com/getevo/json"
"os"
"reflect"
"runtime"
Expand Down
2 changes: 1 addition & 1 deletion lib/outcome/outcome.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package outcome

import (
"encoding/base64"
"encoding/json"
"fmt"
"github.com/getevo/json"
"reflect"
"time"

Expand Down
2 changes: 1 addition & 1 deletion lib/serializer/marshal.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package serializer

import (
"encoding/json"
"github.com/getevo/json"
"github.com/kelindar/binary"
)

Expand Down
2 changes: 1 addition & 1 deletion lib/storage/filesystem/filesystem.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package filesystem

import (
"encoding/json"
"fmt"
"github.com/getevo/evo/v2/lib/gpath"
"github.com/getevo/evo/v2/lib/storage/lib"
"github.com/getevo/json"
"io/fs"
"os"
"path/filepath"
Expand Down
2 changes: 1 addition & 1 deletion lib/storage/ftp/ftp.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package ftp

import (
"bytes"
"encoding/json"
"fmt"
glob "github.com/ganbarodigital/go_glob"
"github.com/getevo/evo/v2/lib/storage/lib"
"github.com/getevo/json"
ftp "github.com/jlaffaye/ftp"
"io/fs"
"path/filepath"
Expand Down
2 changes: 1 addition & 1 deletion lib/storage/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import (
"bufio"
"bytes"
"context"
"encoding/json"
"fmt"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/credentials"
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
glob "github.com/ganbarodigital/go_glob"
"github.com/getevo/evo/v2/lib/storage/lib"
"github.com/getevo/json"
"io"
"io/fs"
"path/filepath"
Expand Down
2 changes: 1 addition & 1 deletion lib/storage/sftp/sftp.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package sftp

import (
"bytes"
"encoding/json"
"fmt"
glob "github.com/ganbarodigital/go_glob"
"github.com/getevo/evo/v2/lib/storage/lib"
"github.com/getevo/evo/v2/lib/storage/sftp/client"
"github.com/getevo/json"
"sync"
"time"

Expand Down
2 changes: 1 addition & 1 deletion lib/stract/stract.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package stract

import (
"encoding/json"
"github.com/getevo/json"
"io/ioutil"
"path/filepath"
"regexp"
Expand Down
2 changes: 1 addition & 1 deletion lib/text/parser.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package text

import (
"encoding/json"
"github.com/getevo/json"
"regexp"
"strings"
)
Expand Down

0 comments on commit 21a98e5

Please sign in to comment.