diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7231daa --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +all: + @echo + @echo + +test: + +redomod: + rm -f go.* + GO111MODULE= go mod init + GO111MODULE= go mod tidy diff --git a/go.mod b/go.mod index ca240d6..b3ac102 100644 --- a/go.mod +++ b/go.mod @@ -1,14 +1,3 @@ -module github.com/alexflint/go-arg +module go.wit.com/dev/alexflint/arg -require ( - github.com/alexflint/go-scalar v1.2.0 - github.com/stretchr/testify v1.7.0 -) - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - gopkg.in/yaml.v3 v3.0.0 // indirect -) - -go 1.18 +go 1.21.4 diff --git a/go.sum b/go.sum deleted file mode 100644 index e2a4cf1..0000000 --- a/go.sum +++ /dev/null @@ -1,16 +0,0 @@ -github.com/alexflint/go-scalar v1.2.0 h1:WR7JPKkeNpnYIOfHRa7ivM21aWAdHD0gEWHCx+WQBRw= -github.com/alexflint/go-scalar v1.2.0/go.mod h1:LoFvNMqS1CPrMVltza4LvnGKhaSpc3oyLEBUZVhhS2o= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/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.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -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/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/parse.go b/parse.go index 169e8cc..7f34737 100644 --- a/parse.go +++ b/parse.go @@ -11,7 +11,7 @@ import ( "reflect" "strings" - scalar "github.com/alexflint/go-scalar" + "go.wit.com/dev/alexflint/scalar" ) // path represents a sequence of steps to find the output location for an diff --git a/reflect.go b/reflect.go index 5d6acb3..a4efe65 100644 --- a/reflect.go +++ b/reflect.go @@ -7,7 +7,7 @@ import ( "unicode" "unicode/utf8" - scalar "github.com/alexflint/go-scalar" + "go.wit.com/dev/alexflint/scalar" ) var textUnmarshalerType = reflect.TypeOf([]encoding.TextUnmarshaler{}).Elem() diff --git a/sequence.go b/sequence.go index 35a3614..e60d2a2 100644 --- a/sequence.go +++ b/sequence.go @@ -5,7 +5,7 @@ import ( "reflect" "strings" - scalar "github.com/alexflint/go-scalar" + "go.wit.com/dev/alexflint/scalar" ) // setSliceOrMap parses a sequence of strings into a slice or map. If clear is diff --git a/test/Makefile b/test/Makefile new file mode 100644 index 0000000..7231daa --- /dev/null +++ b/test/Makefile @@ -0,0 +1,10 @@ +all: + @echo + @echo + +test: + +redomod: + rm -f go.* + GO111MODULE= go mod init + GO111MODULE= go mod tidy diff --git a/example_test.go b/test/example_test.go similarity index 100% rename from example_test.go rename to test/example_test.go diff --git a/test/go.mod b/test/go.mod new file mode 100644 index 0000000..5c6cfd2 --- /dev/null +++ b/test/go.mod @@ -0,0 +1,11 @@ +module go.wit.com/dev/alexflint/arg/test + +go 1.21.4 + +require github.com/stretchr/testify v1.8.4 + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/test/go.sum b/test/go.sum new file mode 100644 index 0000000..fa4b6e6 --- /dev/null +++ b/test/go.sum @@ -0,0 +1,10 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/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/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/parse_test.go b/test/parse_test.go similarity index 100% rename from parse_test.go rename to test/parse_test.go diff --git a/reflect_test.go b/test/reflect_test.go similarity index 100% rename from reflect_test.go rename to test/reflect_test.go diff --git a/sequence_test.go b/test/sequence_test.go similarity index 100% rename from sequence_test.go rename to test/sequence_test.go diff --git a/subcommand_test.go b/test/subcommand_test.go similarity index 100% rename from subcommand_test.go rename to test/subcommand_test.go diff --git a/usage_test.go b/test/usage_test.go similarity index 100% rename from usage_test.go rename to test/usage_test.go