From 72f7a64729d87bc256676e9f0cf38fefcf94b6ae Mon Sep 17 00:00:00 2001 From: Bill Havanki Date: Fri, 9 Aug 2024 15:10:52 -0400 Subject: [PATCH] chore: Create module, Makefile --- .gitattributes | 1 + Makefile | 11 +++++++++++ db_test.go | 2 +- go.mod | 16 ++++++++++++++++ go.sum | 22 ++++++++++++++++++++++ 5 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 .gitattributes create mode 100644 Makefile create mode 100644 go.mod create mode 100644 go.sum diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..2e97079 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +go.sum linguist-generated=true diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..51cd2ac --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +.PHONY: test +test: + go test ./... + +.PHONY: fmt +fmt: + go fmt ./... + +.PHONY: vet +vet: + go vet ./... diff --git a/db_test.go b/db_test.go index 8583810..2684f8a 100644 --- a/db_test.go +++ b/db_test.go @@ -162,7 +162,7 @@ func setup(t *testing.T) *athenaHarness { func (a *athenaHarness) setupTable() { // tables cannot start with numbers or contain dashes - id, _ := uuid.NewV4() + id := uuid.NewV4() a.table = "t_" + strings.Replace(id.String(), "-", "_", -1) a.mustExec(`CREATE EXTERNAL TABLE %[1]s ( nullValue string, diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..70f7659 --- /dev/null +++ b/go.mod @@ -0,0 +1,16 @@ +module github.com/segmentio/go-athena + +go 1.21 + +require ( + github.com/aws/aws-sdk-go v1.55.5 + github.com/satori/go.uuid v1.2.0 + github.com/stretchr/testify v1.9.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..f09d78c --- /dev/null +++ b/go.sum @@ -0,0 +1,22 @@ +github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= +github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= +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/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +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/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +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.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=