Skip to content

Commit

Permalink
remove dependency on fileutil library
Browse files Browse the repository at this point in the history
  • Loading branch information
jordan2175 committed Feb 14, 2021
1 parent 74615e2 commit fac8bc9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
9 changes: 4 additions & 5 deletions es6numfmt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"strings"
"testing"

"github.com/beeemT/Packages/fileutil"
"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -70,9 +69,7 @@ func TestNumberToJSON(t *testing.T) {
},
}

exists, err := fileutil.Exists(testFile)
r.NoErrorf(err, "Failed at testing if numbers test file exists: %s\n", err)
if exists {
if _, err := os.Stat(testFile); err == nil {
file, err := os.Open(testFile)
r.NoErrorf(err, "Failed at reading test sample file: %s\n", err)

Expand All @@ -96,7 +93,9 @@ func TestNumberToJSON(t *testing.T) {
}
r.NoErrorf(err, "Failed at scanning test file: %s\n", err)
file.Close()

} else if os.IsNotExist(err) {
} else {
r.NoErrorf(err, "Failed at testing if numbers test file exists: %s\n", err)
}

for _, tC := range testCases {
Expand Down
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@ module github.com/gowebpki/jcs

go 1.15

require (
github.com/beeemT/Packages/fileutil v1.0.0
github.com/stretchr/testify v1.7.0
)
require github.com/stretchr/testify v1.7.0
4 changes: 1 addition & 3 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
github.com/beeemT/Packages v1.0.0 h1:JIkQRRGi+KqjvssKJgiNVmrRndg4mU5cW8V4C55N/dA=
github.com/beeemT/Packages/fileutil v1.0.0 h1:s5jgw/4mUqKhm5Wv0m7tTmiOb74m+FP1oqjSyQQnAXk=
github.com/beeemT/Packages/fileutil v1.0.0/go.mod h1:U8KuipNlBzlIQTX9mQk/kWVhaYO0IxMlaCJj3oCl9T4=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

0 comments on commit fac8bc9

Please sign in to comment.