diff --git a/command/hash.go b/command/hash.go index 0df96af..7d839a1 100644 --- a/command/hash.go +++ b/command/hash.go @@ -1,7 +1,7 @@ package command import ( - "github.com/no-src/gofs/util/hashutil" + "github.com/no-src/nsgo/hashutil" ) type hash struct { diff --git a/command/is_dir.go b/command/is_dir.go index 1c98941..d02409a 100644 --- a/command/is_dir.go +++ b/command/is_dir.go @@ -1,7 +1,7 @@ package command import ( - "github.com/no-src/gofs/fs" + "github.com/no-src/nsgo/fsutil" ) type isDir struct { @@ -10,7 +10,7 @@ type isDir struct { } func (c isDir) Exec() error { - dir, err := fs.IsDir(c.Source) + dir, err := fsutil.IsDir(c.Source) if err != nil { return err } diff --git a/command/is_equal.go b/command/is_equal.go index 75d3001..4646ee2 100644 --- a/command/is_equal.go +++ b/command/is_equal.go @@ -3,7 +3,7 @@ package command import ( "os" - "github.com/no-src/gofs/util/hashutil" + "github.com/no-src/nsgo/hashutil" ) type isEqual struct { diff --git a/command/is_exist.go b/command/is_exist.go index b83b721..06f2f07 100644 --- a/command/is_exist.go +++ b/command/is_exist.go @@ -1,7 +1,7 @@ package command import ( - "github.com/no-src/gofs/fs" + "github.com/no-src/nsgo/fsutil" ) type isExist struct { @@ -10,7 +10,7 @@ type isExist struct { } func (c isExist) Exec() error { - exist, err := fs.FileExist(c.Source) + exist, err := fsutil.FileExist(c.Source) if err == nil && exist != c.Expect { err = newNotExpectedError(c, exist) } diff --git a/command/is_symlink.go b/command/is_symlink.go index 893c31a..49666c3 100644 --- a/command/is_symlink.go +++ b/command/is_symlink.go @@ -1,7 +1,7 @@ package command import ( - "github.com/no-src/gofs/fs" + "github.com/no-src/nsgo/fsutil" ) type isSymlink struct { @@ -11,7 +11,7 @@ type isSymlink struct { } func (c isSymlink) Exec() error { - actual, err := fs.IsSymlink(c.Link) + actual, err := fsutil.IsSymlink(c.Link) if err != nil { if c.IgnoreError { return nil diff --git a/command/touch.go b/command/touch.go index c0fb5c8..415d58a 100644 --- a/command/touch.go +++ b/command/touch.go @@ -1,7 +1,7 @@ package command import ( - "github.com/no-src/gofs/fs" + "github.com/no-src/nsgo/fsutil" ) type touch struct { @@ -9,7 +9,7 @@ type touch struct { } func (c touch) Exec() error { - f, err := fs.CreateFile(c.Source) + f, err := fsutil.CreateFile(c.Source) if err != nil { return err } diff --git a/go.mod b/go.mod index aecfc59..2fc4b85 100644 --- a/go.mod +++ b/go.mod @@ -3,13 +3,13 @@ module github.com/no-src/fsctl go 1.20 require ( - github.com/no-src/gofs v0.8.0 github.com/no-src/log v0.3.1 + github.com/no-src/nsgo v0.0.0-20231103152835-167bae0e1fb2 gopkg.in/yaml.v3 v3.0.1 ) require ( - github.com/kr/pretty v0.3.0 // indirect - github.com/rogpeppe/go-internal v1.8.0 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/rogpeppe/go-internal v1.9.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect ) diff --git a/go.sum b/go.sum index f83699d..4e2af40 100644 --- a/go.sum +++ b/go.sum @@ -1,24 +1,18 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/no-src/gofs v0.8.0 h1:MQ4+u/s0k+8UYyAjMNFSYDT67nOuRNli/D0kVbu5a84= -github.com/no-src/gofs v0.8.0/go.mod h1:VRrcok5PjfZDM1TpNLTrYTREGc6uNiYQz5artcl24q4= github.com/no-src/log v0.3.1 h1:HvozFJQwRicaCThaRztVNOACR01jMiK8Upn4eU7lyps= github.com/no-src/log v0.3.1/go.mod h1:AG2AiKsnJpZQHmJ24waj6Bi0xHaBEPXiFl1yYpHzLJQ= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= -github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/no-src/nsgo v0.0.0-20231103152835-167bae0e1fb2 h1:D6T1flNPHi9iloP/vrCI2qbA8HaWil6otgLETOieJPU= +github.com/no-src/nsgo v0.0.0-20231103152835-167bae0e1fb2/go.mod h1:NPhBsJE4Us7xqR6yJh5zUGdx4cELBfAAZDnz5HP9Bqw= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=