From 7e98b6691d316ce659fe3225157ecd9ef610d18e Mon Sep 17 00:00:00 2001 From: Cyrille Hemidy Date: Sun, 18 Feb 2018 00:07:35 +0100 Subject: [PATCH 01/18] add build for go version 1.6.x -> 1.10.x --- .travis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.travis.yml b/.travis.yml index b1d02a82..eab3c5d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,17 @@ language: go + +go: + - 1.6.x + - 1.7.x + - 1.8.x + - 1.9.x + - 1.10.x + go_import_path: firebase.google.com/go + before_install: - go get github.com/golang/lint/golint + script: - golint -set_exit_status $(go list ./...) - go test -v -test.short ./... From 02c4fd50c6662bc294a97de95c757713e44cd9d6 Mon Sep 17 00:00:00 2001 From: Cyrille Hemidy Date: Sun, 18 Feb 2018 00:39:33 +0100 Subject: [PATCH 02/18] fix 1.10 version --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index eab3c5d5..c2064c33 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ go: - 1.7.x - 1.8.x - 1.9.x - - 1.10.x + - "1.10" go_import_path: firebase.google.com/go From 271fafa02c55e79c09c9d6423ce2e223d7450786 Mon Sep 17 00:00:00 2001 From: Cyrille Hemidy Date: Sun, 18 Feb 2018 10:47:31 +0100 Subject: [PATCH 03/18] fix context to golang.org/x/net/context for go 1.6 compatibility --- messaging/messaging_test.go | 5 ++--- snippets/main.go | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/messaging/messaging_test.go b/messaging/messaging_test.go index 27808e84..6706f217 100644 --- a/messaging/messaging_test.go +++ b/messaging/messaging_test.go @@ -15,7 +15,6 @@ package messaging import ( - "context" "encoding/json" "io/ioutil" "net/http" @@ -25,9 +24,9 @@ import ( "testing" "time" - "google.golang.org/api/option" - "firebase.google.com/go/internal" + "golang.org/x/net/context" + "google.golang.org/api/option" ) const testMessageID = "projects/test-project/messages/msg_id" diff --git a/snippets/main.go b/snippets/main.go index 6e4071cb..58c99709 100644 --- a/snippets/main.go +++ b/snippets/main.go @@ -16,12 +16,11 @@ package snippets // [START admin_import] import ( - "context" "log" firebase "firebase.google.com/go" "firebase.google.com/go/auth" - + "golang.org/x/net/context" "google.golang.org/api/iterator" "google.golang.org/api/option" ) From 9e92e51c29d66b2252b8d31cda9deb3a9ca21b91 Mon Sep 17 00:00:00 2001 From: Cyrille Hemidy Date: Sun, 18 Feb 2018 11:14:33 +0100 Subject: [PATCH 04/18] add race detector + go vet on build + build without failure on go unstable --- .travis.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index c2064c33..675c5d63 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,13 +6,22 @@ go: - 1.8.x - 1.9.x - "1.10" + - master + +matrix: + # Build OK if fails on unstable development versions of Go. + allow_failures: + - go: master + # Don't wait for tests to finish on allow_failures. + # Mark the build finished if tests pass on other versions of Go. + fast_finish: true go_import_path: firebase.google.com/go before_install: - - go get github.com/golang/lint/golint + - go get github.com/golang/lint/golint #Golint requires Go 1.6 or later. script: - golint -set_exit_status $(go list ./...) - - go test -v -test.short ./... - + - go test -v -race -test.short ./... # Run tests with the race detector. + - go vet -v ./... # Run Go static analyzer. \ No newline at end of file From 42962c08b4833cad63c1c9af6b7da4874ae51a22 Mon Sep 17 00:00:00 2001 From: Cyrille Hemidy Date: Sun, 18 Feb 2018 12:08:42 +0100 Subject: [PATCH 05/18] add go16 et go17 file due to req.withcontext which is only go 1.7 --- internal/go16.go | 47 +++++++++++++++++++++++++++++++++++++++++ internal/go17.go | 47 +++++++++++++++++++++++++++++++++++++++++ internal/http_client.go | 28 ------------------------ 3 files changed, 94 insertions(+), 28 deletions(-) create mode 100644 internal/go16.go create mode 100644 internal/go17.go diff --git a/internal/go16.go b/internal/go16.go new file mode 100644 index 00000000..8c20b4b5 --- /dev/null +++ b/internal/go16.go @@ -0,0 +1,47 @@ +// +build go1.6 + +// Copyright 2017 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "context" + "io/ioutil" +) + +// Do executes the given Request, and returns a Response. +func (c *HTTPClient) Do(ctx context.Context, r *Request) (*Response, error) { + req, err := r.buildHTTPRequest() + if err != nil { + return nil, err + } + + resp, err := c.Client.Do(req.WithContext(ctx)) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + b, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, err + } + return &Response{ + Status: resp.StatusCode, + Body: b, + Header: resp.Header, + errParser: c.ErrParser, + }, nil +} diff --git a/internal/go17.go b/internal/go17.go new file mode 100644 index 00000000..e10ff953 --- /dev/null +++ b/internal/go17.go @@ -0,0 +1,47 @@ +// +build !go1.6 + +// Copyright 2017 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "context" + "io/ioutil" +) + +// Do executes the given Request, and returns a Response. +func (c *HTTPClient) Do(ctx context.Context, r *Request) (*Response, error) { + req, err := r.buildHTTPRequest() + if err != nil { + return nil, err + } + + resp, err := c.Client.Do(req.WithContext(ctx)) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + b, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, err + } + return &Response{ + Status: resp.StatusCode, + Body: b, + Header: resp.Header, + errParser: c.ErrParser, + }, nil +} diff --git a/internal/http_client.go b/internal/http_client.go index bd40c366..0218496e 100644 --- a/internal/http_client.go +++ b/internal/http_client.go @@ -19,10 +19,7 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "net/http" - - "golang.org/x/net/context" ) // HTTPClient is a convenient API to make HTTP calls. @@ -37,31 +34,6 @@ type HTTPClient struct { ErrParser ErrorParser } -// Do executes the given Request, and returns a Response. -func (c *HTTPClient) Do(ctx context.Context, r *Request) (*Response, error) { - req, err := r.buildHTTPRequest() - if err != nil { - return nil, err - } - - resp, err := c.Client.Do(req.WithContext(ctx)) - if err != nil { - return nil, err - } - defer resp.Body.Close() - - b, err := ioutil.ReadAll(resp.Body) - if err != nil { - return nil, err - } - return &Response{ - Status: resp.StatusCode, - Body: b, - Header: resp.Header, - errParser: c.ErrParser, - }, nil -} - // Request contains all the parameters required to construct an outgoing HTTP request. type Request struct { Method string From 55d603a8d5d3276bb2a5fa3da4e29f9cf8a08a72 Mon Sep 17 00:00:00 2001 From: Cyrille Hemidy Date: Sun, 18 Feb 2018 12:36:13 +0100 Subject: [PATCH 06/18] fix context package --- internal/go16.go | 3 ++- internal/go17.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/go16.go b/internal/go16.go index 8c20b4b5..97a9014a 100644 --- a/internal/go16.go +++ b/internal/go16.go @@ -17,8 +17,9 @@ package internal import ( - "context" "io/ioutil" + + "golang.org/x/net/context" ) // Do executes the given Request, and returns a Response. diff --git a/internal/go17.go b/internal/go17.go index e10ff953..660d29cf 100644 --- a/internal/go17.go +++ b/internal/go17.go @@ -17,8 +17,9 @@ package internal import ( - "context" "io/ioutil" + + "golang.org/x/net/context" ) // Do executes the given Request, and returns a Response. From 483daf0f7700d98644122b1297ccb1ff8366b572 Mon Sep 17 00:00:00 2001 From: Cyrille Hemidy Date: Sun, 18 Feb 2018 13:13:26 +0100 Subject: [PATCH 07/18] update go16.go to remove WithContext --- internal/go16.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/internal/go16.go b/internal/go16.go index 97a9014a..73345515 100644 --- a/internal/go16.go +++ b/internal/go16.go @@ -18,10 +18,24 @@ package internal import ( "io/ioutil" + "net/http" + "net/url" + "github.com/shurcooL/go/ctxhttp" "golang.org/x/net/context" ) +func withContext(ctx context.Context, r *http.Request) *http.Request { + if ctx == nil { + panic("nil context") + } + r2 := new(http.Request) + *r2 = *r + r2.URL = &url.URL{} + *(r2.URL) = *(r.URL) + return r2 +} + // Do executes the given Request, and returns a Response. func (c *HTTPClient) Do(ctx context.Context, r *Request) (*Response, error) { req, err := r.buildHTTPRequest() @@ -29,7 +43,7 @@ func (c *HTTPClient) Do(ctx context.Context, r *Request) (*Response, error) { return nil, err } - resp, err := c.Client.Do(req.WithContext(ctx)) + resp, err := ctxhttp.Do(ctx, c.Client, req) if err != nil { return nil, err } From 2f0b704effbf66469699f332b394583fa666e609 Mon Sep 17 00:00:00 2001 From: Cyrille Hemidy Date: Sun, 18 Feb 2018 13:16:24 +0100 Subject: [PATCH 08/18] update bad import --- internal/go16.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/go16.go b/internal/go16.go index 73345515..62e8aab5 100644 --- a/internal/go16.go +++ b/internal/go16.go @@ -21,8 +21,8 @@ import ( "net/http" "net/url" - "github.com/shurcooL/go/ctxhttp" "golang.org/x/net/context" + "golang.org/x/net/context/ctxhttp" ) func withContext(ctx context.Context, r *http.Request) *http.Request { From 0904018fd9e53c5a2ed3a31244145eaf5b2d4c91 Mon Sep 17 00:00:00 2001 From: Cyrille Hemidy Date: Sun, 18 Feb 2018 13:24:59 +0100 Subject: [PATCH 09/18] remove unused func --- internal/go16.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/internal/go16.go b/internal/go16.go index 62e8aab5..e677d1a4 100644 --- a/internal/go16.go +++ b/internal/go16.go @@ -18,24 +18,11 @@ package internal import ( "io/ioutil" - "net/http" - "net/url" "golang.org/x/net/context" "golang.org/x/net/context/ctxhttp" ) -func withContext(ctx context.Context, r *http.Request) *http.Request { - if ctx == nil { - panic("nil context") - } - r2 := new(http.Request) - *r2 = *r - r2.URL = &url.URL{} - *(r2.URL) = *(r.URL) - return r2 -} - // Do executes the given Request, and returns a Response. func (c *HTTPClient) Do(ctx context.Context, r *Request) (*Response, error) { req, err := r.buildHTTPRequest() From 2e554258f9408ac756e92fb5303f3092996c886b Mon Sep 17 00:00:00 2001 From: Cyrille Hemidy Date: Sun, 18 Feb 2018 13:50:53 +0100 Subject: [PATCH 10/18] finally use ctxhttp.Do with multiple build version --- internal/go16.go | 49 ----------------------------------------- internal/go17.go | 48 ---------------------------------------- internal/http_client.go | 29 ++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 97 deletions(-) delete mode 100644 internal/go16.go delete mode 100644 internal/go17.go diff --git a/internal/go16.go b/internal/go16.go deleted file mode 100644 index e677d1a4..00000000 --- a/internal/go16.go +++ /dev/null @@ -1,49 +0,0 @@ -// +build go1.6 - -// Copyright 2017 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package internal - -import ( - "io/ioutil" - - "golang.org/x/net/context" - "golang.org/x/net/context/ctxhttp" -) - -// Do executes the given Request, and returns a Response. -func (c *HTTPClient) Do(ctx context.Context, r *Request) (*Response, error) { - req, err := r.buildHTTPRequest() - if err != nil { - return nil, err - } - - resp, err := ctxhttp.Do(ctx, c.Client, req) - if err != nil { - return nil, err - } - defer resp.Body.Close() - - b, err := ioutil.ReadAll(resp.Body) - if err != nil { - return nil, err - } - return &Response{ - Status: resp.StatusCode, - Body: b, - Header: resp.Header, - errParser: c.ErrParser, - }, nil -} diff --git a/internal/go17.go b/internal/go17.go deleted file mode 100644 index 660d29cf..00000000 --- a/internal/go17.go +++ /dev/null @@ -1,48 +0,0 @@ -// +build !go1.6 - -// Copyright 2017 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package internal - -import ( - "io/ioutil" - - "golang.org/x/net/context" -) - -// Do executes the given Request, and returns a Response. -func (c *HTTPClient) Do(ctx context.Context, r *Request) (*Response, error) { - req, err := r.buildHTTPRequest() - if err != nil { - return nil, err - } - - resp, err := c.Client.Do(req.WithContext(ctx)) - if err != nil { - return nil, err - } - defer resp.Body.Close() - - b, err := ioutil.ReadAll(resp.Body) - if err != nil { - return nil, err - } - return &Response{ - Status: resp.StatusCode, - Body: b, - Header: resp.Header, - errParser: c.ErrParser, - }, nil -} diff --git a/internal/http_client.go b/internal/http_client.go index 0218496e..d38c9567 100644 --- a/internal/http_client.go +++ b/internal/http_client.go @@ -19,7 +19,11 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" + + "golang.org/x/net/context" + "golang.org/x/net/context/ctxhttp" ) // HTTPClient is a convenient API to make HTTP calls. @@ -42,6 +46,31 @@ type Request struct { Opts []HTTPOption } +// Do executes the given Request, and returns a Response. +func (c *HTTPClient) Do(ctx context.Context, r *Request) (*Response, error) { + req, err := r.buildHTTPRequest() + if err != nil { + return nil, err + } + + resp, err := ctxhttp.Do(ctx, c.Client, req) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + b, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, err + } + return &Response{ + Status: resp.StatusCode, + Body: b, + Header: resp.Header, + errParser: c.ErrParser, + }, nil +} + func (r *Request) buildHTTPRequest() (*http.Request, error) { var opts []HTTPOption var data io.Reader From 6a529e36a192ec8176c979320bc6fbbdad8d1822 Mon Sep 17 00:00:00 2001 From: Cyrille Hemidy Date: Sun, 18 Feb 2018 14:52:56 +0100 Subject: [PATCH 11/18] ignore integration package for install --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 675c5d63..01cdf344 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,9 @@ go_import_path: firebase.google.com/go before_install: - go get github.com/golang/lint/golint #Golint requires Go 1.6 or later. +install: + - go get -t -v | go list ./... | grep -v integration + script: - golint -set_exit_status $(go list ./...) - go test -v -race -test.short ./... # Run tests with the race detector. From efe0c3667f64e4831b6ce4dff12475c054f69330 Mon Sep 17 00:00:00 2001 From: Cyrille Hemidy Date: Sun, 18 Feb 2018 15:01:26 +0100 Subject: [PATCH 12/18] fix go get command --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 01cdf344..96c8c44d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,8 @@ before_install: - go get github.com/golang/lint/golint #Golint requires Go 1.6 or later. install: - - go get -t -v | go list ./... | grep -v integration + # prio to go 1.8 package with only test go get returns : "no buildable Go source files ..." + - go get -t -v $(go list ./... | grep -v integration) script: - golint -set_exit_status $(go list ./...) From 4053564aead7e43681db5ee2387d3f044022a2c1 Mon Sep 17 00:00:00 2001 From: Cyrille Hemidy Date: Sun, 18 Feb 2018 17:38:10 +0100 Subject: [PATCH 13/18] put go 1.6.X in allow_failures dur to test failure --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 96c8c44d..8fd93a8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ matrix: # Build OK if fails on unstable development versions of Go. allow_failures: - go: master + - go: 1.6.x # Don't wait for tests to finish on allow_failures. # Mark the build finished if tests pass on other versions of Go. fast_finish: true From fc945aa614c6fc270304568deb90fca005e8352e Mon Sep 17 00:00:00 2001 From: Cyrille Hemidy Date: Tue, 20 Feb 2018 09:47:15 +0100 Subject: [PATCH 14/18] fix inversion of code --- internal/http_client.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/http_client.go b/internal/http_client.go index d38c9567..50beda50 100644 --- a/internal/http_client.go +++ b/internal/http_client.go @@ -38,14 +38,6 @@ type HTTPClient struct { ErrParser ErrorParser } -// Request contains all the parameters required to construct an outgoing HTTP request. -type Request struct { - Method string - URL string - Body HTTPEntity - Opts []HTTPOption -} - // Do executes the given Request, and returns a Response. func (c *HTTPClient) Do(ctx context.Context, r *Request) (*Response, error) { req, err := r.buildHTTPRequest() @@ -71,6 +63,14 @@ func (c *HTTPClient) Do(ctx context.Context, r *Request) (*Response, error) { }, nil } +// Request contains all the parameters required to construct an outgoing HTTP request. +type Request struct { + Method string + URL string + Body HTTPEntity + Opts []HTTPOption +} + func (r *Request) buildHTTPRequest() (*http.Request, error) { var opts []HTTPOption var data io.Reader From d62d39ed3703db5125eebd51660b997654a66b09 Mon Sep 17 00:00:00 2001 From: Cyrille Hemidy Date: Mon, 26 Feb 2018 21:58:06 +0100 Subject: [PATCH 15/18] remove go 1.6 support --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8fd93a8f..2a9328e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: go go: - - 1.6.x - 1.7.x - 1.8.x - 1.9.x @@ -12,7 +11,6 @@ matrix: # Build OK if fails on unstable development versions of Go. allow_failures: - go: master - - go: 1.6.x # Don't wait for tests to finish on allow_failures. # Mark the build finished if tests pass on other versions of Go. fast_finish: true From fe3200899c525c88fee2d74befb13b4df50e1572 Mon Sep 17 00:00:00 2001 From: Cyrille Hemidy Date: Mon, 26 Feb 2018 21:59:53 +0100 Subject: [PATCH 16/18] revert initial version with req.WithContext --- internal/http_client.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/http_client.go b/internal/http_client.go index 50beda50..bd40c366 100644 --- a/internal/http_client.go +++ b/internal/http_client.go @@ -23,7 +23,6 @@ import ( "net/http" "golang.org/x/net/context" - "golang.org/x/net/context/ctxhttp" ) // HTTPClient is a convenient API to make HTTP calls. @@ -45,7 +44,7 @@ func (c *HTTPClient) Do(ctx context.Context, r *Request) (*Response, error) { return nil, err } - resp, err := ctxhttp.Do(ctx, c.Client, req) + resp, err := c.Client.Do(req.WithContext(ctx)) if err != nil { return nil, err } From 495ea72d19f22d09070624632f58d08c1f344568 Mon Sep 17 00:00:00 2001 From: Cyrille Hemidy Date: Mon, 26 Feb 2018 22:02:35 +0100 Subject: [PATCH 17/18] fix travis to support go 1.10.x --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2a9328e6..91092d57 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ go: - 1.7.x - 1.8.x - 1.9.x - - "1.10" + - "1.10.x" - master matrix: From 5d1367885a0f4eb00a36e5937b81cf133fe2b62c Mon Sep 17 00:00:00 2001 From: Cyrille Hemidy Date: Mon, 26 Feb 2018 22:29:35 +0100 Subject: [PATCH 18/18] nits --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 91092d57..53f411b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,13 +18,13 @@ matrix: go_import_path: firebase.google.com/go before_install: - - go get github.com/golang/lint/golint #Golint requires Go 1.6 or later. + - go get github.com/golang/lint/golint # Golint requires Go 1.6 or later. install: - # prio to go 1.8 package with only test go get returns : "no buildable Go source files ..." + # Prior to golang 1.8, this can trigger an error for packages containing only tests. - go get -t -v $(go list ./... | grep -v integration) script: - golint -set_exit_status $(go list ./...) - go test -v -race -test.short ./... # Run tests with the race detector. - - go vet -v ./... # Run Go static analyzer. \ No newline at end of file + - go vet -v ./... # Run Go static analyzer.