diff --git a/.travis.yml b/.travis.yml index 095c9db..b819daa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ before_install: - sudo apt-get update install: - - curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.51.2 + - curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.1 - curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b $(go env GOPATH)/bin - go install golang.org/x/tools/cmd/goimports@latest diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 49dbf30..791a55e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -58,7 +58,7 @@ If you want to contribute to the repository, here's a quick guide: ``` The above command will run all the unit tests with the command `go test -tags=all`. Each unit test file contains one or more build tags as a way to classify the - tests into various groups (example: `// +build all fast auth`). + tests into various groups (example: `//go:build all || fast || auth`). Currently, these tags include: all, slow, fast, auth, basesvc, log and retries. Others might be added in the future. To run a specific class of tests (example 'retries'), use a command like this: diff --git a/core/authenticator_factory_test.go b/core/authenticator_factory_test.go index 3750f80..c82a40d 100644 --- a/core/authenticator_factory_test.go +++ b/core/authenticator_factory_test.go @@ -1,5 +1,4 @@ //go:build all || fast -// +build all fast package core diff --git a/core/base_service_retries_test.go b/core/base_service_retries_test.go index dcfab49..5f6d517 100644 --- a/core/base_service_retries_test.go +++ b/core/base_service_retries_test.go @@ -1,5 +1,4 @@ //go:build all || slow || basesvc || retries -// +build all slow basesvc retries package core diff --git a/core/base_service_test.go b/core/base_service_test.go index 9ee052c..5e14aac 100644 --- a/core/base_service_test.go +++ b/core/base_service_test.go @@ -1,5 +1,4 @@ //go:build all || fast || basesvc -// +build all fast basesvc package core diff --git a/core/basic_authenticator_test.go b/core/basic_authenticator_test.go index 42b8cb8..bd5fc2e 100644 --- a/core/basic_authenticator_test.go +++ b/core/basic_authenticator_test.go @@ -1,5 +1,4 @@ //go:build all || fast || auth -// +build all fast auth package core diff --git a/core/bearer_token_authenticator_test.go b/core/bearer_token_authenticator_test.go index 676cfa7..2585d7e 100644 --- a/core/bearer_token_authenticator_test.go +++ b/core/bearer_token_authenticator_test.go @@ -1,5 +1,4 @@ //go:build all || fast || auth -// +build all fast auth package core diff --git a/core/common_test.go b/core/common_test.go index 2eb333e..5a9b501 100644 --- a/core/common_test.go +++ b/core/common_test.go @@ -1,5 +1,4 @@ //go:build all || fast || basesvc -// +build all fast basesvc package core diff --git a/core/config_utils_test.go b/core/config_utils_test.go index 659c826..eb39df9 100644 --- a/core/config_utils_test.go +++ b/core/config_utils_test.go @@ -1,5 +1,4 @@ //go:build all || fast || basesvc -// +build all fast basesvc package core diff --git a/core/container_authenticator_test.go b/core/container_authenticator_test.go index 33da70f..32622ab 100644 --- a/core/container_authenticator_test.go +++ b/core/container_authenticator_test.go @@ -1,5 +1,4 @@ //go:build all || auth -// +build all auth package core diff --git a/core/cp4d_authenticator_test.go b/core/cp4d_authenticator_test.go index 02af220..cb98f36 100644 --- a/core/cp4d_authenticator_test.go +++ b/core/cp4d_authenticator_test.go @@ -1,5 +1,4 @@ //go:build all || slow || auth -// +build all slow auth package core diff --git a/core/datetime_test.go b/core/datetime_test.go index 5589e37..e75af1e 100644 --- a/core/datetime_test.go +++ b/core/datetime_test.go @@ -1,5 +1,4 @@ //go:build all || fast -// +build all fast package core diff --git a/core/detailed_response_test.go b/core/detailed_response_test.go index fca909a..08ced9d 100644 --- a/core/detailed_response_test.go +++ b/core/detailed_response_test.go @@ -1,5 +1,4 @@ //go:build all || fast || basesvc -// +build all fast basesvc package core diff --git a/core/gzip_test.go b/core/gzip_test.go index 4e0a8fb..7fe340b 100644 --- a/core/gzip_test.go +++ b/core/gzip_test.go @@ -1,5 +1,4 @@ //go:build all || fast || basesvc -// +build all fast basesvc package core diff --git a/core/iam_authenticator_test.go b/core/iam_authenticator_test.go index b599e96..c117250 100644 --- a/core/iam_authenticator_test.go +++ b/core/iam_authenticator_test.go @@ -1,5 +1,4 @@ //go:build all || slow || auth -// +build all slow auth package core diff --git a/core/jwt_utils_test.go b/core/jwt_utils_test.go index ce9dda4..d20b278 100644 --- a/core/jwt_utils_test.go +++ b/core/jwt_utils_test.go @@ -1,5 +1,4 @@ //go:build all || fast || auth -// +build all fast auth package core diff --git a/core/log_test.go b/core/log_test.go index 48e8ad7..a4b2931 100644 --- a/core/log_test.go +++ b/core/log_test.go @@ -1,5 +1,4 @@ //go:build all || fast || log -// +build all fast log package core diff --git a/core/marshal_nulls_test.go b/core/marshal_nulls_test.go index 890a71a..01a0e4f 100644 --- a/core/marshal_nulls_test.go +++ b/core/marshal_nulls_test.go @@ -1,5 +1,4 @@ //go:build all || fast -// +build all fast package core diff --git a/core/mcsp_authenticator_test.go b/core/mcsp_authenticator_test.go index d2dd8f4..3b9b236 100644 --- a/core/mcsp_authenticator_test.go +++ b/core/mcsp_authenticator_test.go @@ -1,5 +1,4 @@ //go:build all || slow || auth -// +build all slow auth package core diff --git a/core/noauth_authenticator_test.go b/core/noauth_authenticator_test.go index 5c4d442..2fc55a6 100644 --- a/core/noauth_authenticator_test.go +++ b/core/noauth_authenticator_test.go @@ -1,5 +1,4 @@ //go:build all || fast || auth -// +build all fast auth package core diff --git a/core/parameterized_url_test.go b/core/parameterized_url_test.go index 492c8bf..6c61254 100644 --- a/core/parameterized_url_test.go +++ b/core/parameterized_url_test.go @@ -1,5 +1,4 @@ //go:build all || fast -// +build all fast package core diff --git a/core/request_builder_test.go b/core/request_builder_test.go index 688203e..7bbbd9c 100644 --- a/core/request_builder_test.go +++ b/core/request_builder_test.go @@ -1,5 +1,4 @@ //go:build all || fast || basesvc -// +build all fast basesvc package core diff --git a/core/unmarshal_v2_models_test.go b/core/unmarshal_v2_models_test.go index ab9668b..6903385 100644 --- a/core/unmarshal_v2_models_test.go +++ b/core/unmarshal_v2_models_test.go @@ -1,5 +1,4 @@ //go:build all || fast -// +build all fast package core diff --git a/core/unmarshal_v2_primitives_test.go b/core/unmarshal_v2_primitives_test.go index b5bc0f5..e1eca10 100644 --- a/core/unmarshal_v2_primitives_test.go +++ b/core/unmarshal_v2_primitives_test.go @@ -1,5 +1,4 @@ //go:build all || fast -// +build all fast package core diff --git a/core/utils_test.go b/core/utils_test.go index 4a625b1..42581be 100644 --- a/core/utils_test.go +++ b/core/utils_test.go @@ -1,5 +1,4 @@ //go:build all || fast -// +build all fast package core diff --git a/core/vpc_instance_authenticator_test.go b/core/vpc_instance_authenticator_test.go index fa83240..270f1d6 100644 --- a/core/vpc_instance_authenticator_test.go +++ b/core/vpc_instance_authenticator_test.go @@ -1,5 +1,4 @@ //go:build all || auth -// +build all auth package core