From d5c9111edf1d2b3769b07891934f7164cdc6fd76 Mon Sep 17 00:00:00 2001 From: tom twinkle Date: Mon, 13 Feb 2023 12:34:01 +0900 Subject: [PATCH] enhancement: update go1.20 --- .github/workflows/test-aws.yaml | 2 +- .github/workflows/test-cerrors.yaml | 2 +- .github/workflows/test-envlookup.yaml | 2 +- .github/workflows/test-utf8bom.yaml | 2 +- README.md | 9 ++- Taskfile.yaml | 88 +++++++++++++++++++++++++++ aws/README.md | 2 +- aws/go.mod | 2 +- cerrors/go.mod | 2 +- envlookup/go.mod | 2 +- errgroup/go.mod | 2 +- osext/go.mod | 2 +- sql-escape/go.mod | 2 +- tspb_cast/go.mod | 2 +- ulid/go.mod | 2 +- utf8bom/go.mod | 3 +- utf8bom/go.sum | 4 -- 17 files changed, 110 insertions(+), 20 deletions(-) create mode 100644 Taskfile.yaml diff --git a/.github/workflows/test-aws.yaml b/.github/workflows/test-aws.yaml index 729557a..f36d5f7 100644 --- a/.github/workflows/test-aws.yaml +++ b/.github/workflows/test-aws.yaml @@ -20,7 +20,7 @@ jobs: test: strategy: matrix: - go-version: [ 1.19.x ] + go-version: [ 1.20.x ] os: [ ubuntu-latest ] runs-on: ${{ matrix.os }} timeout-minutes: 5 diff --git a/.github/workflows/test-cerrors.yaml b/.github/workflows/test-cerrors.yaml index 299609b..90a61f2 100644 --- a/.github/workflows/test-cerrors.yaml +++ b/.github/workflows/test-cerrors.yaml @@ -20,7 +20,7 @@ jobs: test: strategy: matrix: - go-version: [ 1.19.x ] + go-version: [ 1.20.x ] os: [ ubuntu-latest ] runs-on: ${{ matrix.os }} timeout-minutes: 5 diff --git a/.github/workflows/test-envlookup.yaml b/.github/workflows/test-envlookup.yaml index 55c4f23..d90e77b 100644 --- a/.github/workflows/test-envlookup.yaml +++ b/.github/workflows/test-envlookup.yaml @@ -20,7 +20,7 @@ jobs: test: strategy: matrix: - go-version: [ 1.19.x ] + go-version: [ 1.20.x ] os: [ ubuntu-latest ] runs-on: ${{ matrix.os }} timeout-minutes: 5 diff --git a/.github/workflows/test-utf8bom.yaml b/.github/workflows/test-utf8bom.yaml index e2c947d..10319d8 100644 --- a/.github/workflows/test-utf8bom.yaml +++ b/.github/workflows/test-utf8bom.yaml @@ -20,7 +20,7 @@ jobs: test: strategy: matrix: - go-version: [ 1.19.x ] + go-version: [ 1.20.x ] os: [ ubuntu-latest ] runs-on: ${{ matrix.os }} timeout-minutes: 5 diff --git a/README.md b/README.md index 4f8199e..ef13499 100644 --- a/README.md +++ b/README.md @@ -1 +1,8 @@ -# go-utils \ No newline at end of file +# go-utils + +## Testing +- + +```shell +task -p test +``` \ No newline at end of file diff --git a/Taskfile.yaml b/Taskfile.yaml new file mode 100644 index 0000000..5a4440c --- /dev/null +++ b/Taskfile.yaml @@ -0,0 +1,88 @@ +version: '3' + +dotenv: ['.env', '{{.ENV}}/.env.', '{{.HOME}}/.env'] + +tasks: + test: + deps: [test-aws,test-cerrors,test-envlookup,test-errgroup,test-osext,test-sql-escape,test-tspb_cast,test-ulid,test-utf8bom] + test-aws: + dir: aws + cmds: + - docker compose up -d + - defer: docker compose down + - sleep 5 + - go test ./... + test-cerrors: + dir: cerrors + cmds: + - go test ./... + test-envlookup: + dir: envlookup + cmds: + - go test ./... + test-errgroup: + dir: errgroup + cmds: + - go test ./... + test-osext: + dir: osext + cmds: + - go test ./... + test-sql-escape: + dir: sql-escape + cmds: + - go test ./... + test-tspb_cast: + dir: tspb_cast + cmds: + - go test ./... + test-ulid: + dir: ulid + cmds: + - go test ./... + test-utf8bom: + dir: utf8bom + cmds: + - go test ./... + + go-mod-tidy: + deps: [ + go-mod-tidy-aws,go-mod-tidy-cerrors,go-mod-tidy-envlookup,go-mod-tidy-errgroup,go-mod-tidy-osext, + go-mod-tidy-sql-escape,go-mod-tidy-tspb_cast,go-mod-tidy-ulid,go-mod-tidy-utf8bom, + ] + go-mod-tidy-aws: + dir: aws + cmds: + - go mod tidy + go-mod-tidy-cerrors: + dir: cerrors + cmds: + - go mod tidy + go-mod-tidy-envlookup: + dir: envlookup + cmds: + - go mod tidy + go-mod-tidy-errgroup: + dir: errgroup + cmds: + - go mod tidy + go-mod-tidy-osext: + dir: osext + cmds: + - go mod tidy + go-mod-tidy-sql-escape: + dir: sql-escape + cmds: + - go mod tidy + go-mod-tidy-tspb_cast: + dir: tspb_cast + cmds: + - go mod tidy + go-mod-tidy-ulid: + dir: ulid + cmds: + - go mod tidy + go-mod-tidy-utf8bom: + dir: utf8bom + cmds: + - go mod tidy diff --git a/aws/README.md b/aws/README.md index 9ca4f5e..84763d8 100644 --- a/aws/README.md +++ b/aws/README.md @@ -6,7 +6,7 @@ ## Development ### required for development -- docker-compose v2 +- docker compose v2 - localstack - minio diff --git a/aws/go.mod b/aws/go.mod index 77bc528..e22ad40 100644 --- a/aws/go.mod +++ b/aws/go.mod @@ -1,6 +1,6 @@ module github.com/88labs/go-utils/aws -go 1.19 +go 1.20 require ( github.com/88labs/go-utils/ulid v0.1.1 diff --git a/cerrors/go.mod b/cerrors/go.mod index a9dc981..2f06135 100644 --- a/cerrors/go.mod +++ b/cerrors/go.mod @@ -1,5 +1,5 @@ module github.com/88labs/go-utils/cerrors -go 1.19 +go 1.20 require golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 diff --git a/envlookup/go.mod b/envlookup/go.mod index 76f67ab..a3830f0 100644 --- a/envlookup/go.mod +++ b/envlookup/go.mod @@ -1,6 +1,6 @@ module github.com/88labs/go-utils/envlookup -go 1.19 +go 1.20 require ( github.com/88labs/go-utils/aws v0.6.1 diff --git a/errgroup/go.mod b/errgroup/go.mod index a6ca895..d417672 100644 --- a/errgroup/go.mod +++ b/errgroup/go.mod @@ -1,3 +1,3 @@ module github.com/88labs/go-utils/errgroup -go 1.19 +go 1.20 diff --git a/osext/go.mod b/osext/go.mod index 18bc757..18fa293 100644 --- a/osext/go.mod +++ b/osext/go.mod @@ -1,3 +1,3 @@ module github.com/88labs/go-utils/osext -go 1.18 +go 1.20 diff --git a/sql-escape/go.mod b/sql-escape/go.mod index ffc95c8..16fb8f3 100644 --- a/sql-escape/go.mod +++ b/sql-escape/go.mod @@ -1,3 +1,3 @@ module github.com/88labs/go-utils/sql-escape -go 1.18 +go 1.20 diff --git a/tspb_cast/go.mod b/tspb_cast/go.mod index 80d311b..cceedc4 100644 --- a/tspb_cast/go.mod +++ b/tspb_cast/go.mod @@ -1,5 +1,5 @@ module github.com/88labs/go-utils/tspb_cast -go 1.18 +go 1.20 require google.golang.org/protobuf v1.28.1 diff --git a/ulid/go.mod b/ulid/go.mod index 6cc3639..541200f 100644 --- a/ulid/go.mod +++ b/ulid/go.mod @@ -1,5 +1,5 @@ module github.com/88labs/go-utils/ulid -go 1.18 +go 1.20 require github.com/oklog/ulid/v2 v2.1.0 diff --git a/utf8bom/go.mod b/utf8bom/go.mod index 085cf2a..b090263 100644 --- a/utf8bom/go.mod +++ b/utf8bom/go.mod @@ -1,6 +1,6 @@ module github.com/88labs/go-utils/utf8bom -go 1.19 +go 1.20 require ( github.com/bxcodec/faker/v3 v3.8.1 @@ -10,6 +10,5 @@ require ( require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/objx v0.5.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/utf8bom/go.sum b/utf8bom/go.sum index 0925143..dc5ed36 100644 --- a/utf8bom/go.sum +++ b/utf8bom/go.sum @@ -1,5 +1,3 @@ -github.com/bxcodec/faker/v3 v3.8.0 h1:F59Qqnsh0BOtZRC+c4cXoB/VNYDMS3R5mlSpxIap1oU= -github.com/bxcodec/faker/v3 v3.8.0/go.mod h1:gF31YgnMSMKgkvl+fyEo1xuSMbEuieyqfeslGYFjneM= github.com/bxcodec/faker/v3 v3.8.1 h1:qO/Xq19V6uHt2xujwpaetgKhraGCapqY2CRWGD/SqcM= github.com/bxcodec/faker/v3 v3.8.1/go.mod h1:DdSDccxF5msjFo5aO4vrobRQ8nIApg8kq3QWPEQD6+o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -9,10 +7,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb 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/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=