Skip to content

Commit

Permalink
chore: Bumped minimum go version to 1.17 (#505)
Browse files Browse the repository at this point in the history
* chore: Bumped minimum go version to 1.16

* Update to 1.17

* run go mod tidy

* fix formatting errors in 1.19
  • Loading branch information
lahirumaramba authored Sep 16, 2022
1 parent f6f1f7c commit 2f8734e
Show file tree
Hide file tree
Showing 9 changed files with 140 additions and 64 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,23 @@ jobs:
strategy:
fail-fast: false
matrix:
go: [1.15, 1.16, 1.17]
go: [1.17, 1.18, 1.19]

steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}

- name: Install golint
run: go get golang.org/x/lint/golint
run: go install golang.org/x/lint/golint@latest

- name: Check out code
uses: actions/checkout@v2

- name: Run Linter
run: |
GOLINT=`go list -f {{.Target}} golang.org/x/lint/golint`
$GOLINT -set_exit_status ./...
golint -set_exit_status ./...
- name: Run Unit Tests
if: success() || failure()
Expand All @@ -50,10 +49,10 @@ jobs:
GO111MODULE: off

steps:
- name: Set up Go 1.16
uses: actions/setup-go@v1
- name: Set up Go 1.17
uses: actions/setup-go@v3
with:
go-version: 1.16
go-version: 1.17

- name: Check out code into GOPATH
uses: actions/checkout@v2
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ jobs:

steps:
- name: Set up Go
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: 1.15
go-version: 1.17

- name: Install golint
run: go get golang.org/x/lint/golint
run: go install golang.org/x/lint/golint@latest

- name: Check out code
uses: actions/checkout@v2
Expand All @@ -43,8 +43,7 @@ jobs:

- name: Run Linter
run: |
GOLINT=`go list -f {{.Target}} golang.org/x/lint/golint`
$GOLINT -set_exit_status ./...
golint -set_exit_status ./...
- name: Run Tests
run: ./.github/scripts/run_all_tests.sh
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ jobs:
# via the 'ref' client parameter.
steps:
- name: Set up Go
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: 1.15
go-version: 1.17

- name: Install golint
run: go get golang.org/x/lint/golint
run: go install golang.org/x/lint/golint@latest

- name: Check out code
uses: actions/checkout@v2
Expand All @@ -54,8 +54,7 @@ jobs:

- name: Run Linter
run: |
GOLINT=`go list -f {{.Target}} golang.org/x/lint/golint`
$GOLINT -set_exit_status ./...
golint -set_exit_status ./...
- name: Run Tests
run: ./.github/scripts/run_all_tests.sh
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ requests, code review feedback, and also pull requests.
## Supported Go Versions

The Admin Go SDK is compatible with at least the three most recent, major Go releases.
We currently support Go v1.15 and higher.
We currently support Go v1.17 and higher.
[Continuous integration](https://github.com/firebase/firebase-admin-go/actions) system
tests the code on Go v1.15 through v1.17.
tests the code on Go v1.17 through v1.19.

## Documentation

Expand Down
7 changes: 4 additions & 3 deletions auth/user_mgt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2051,9 +2051,10 @@ type mockAuthServer struct {
// echoServer takes either a []byte or a string filename, or an object.
//
// echoServer returns a server whose client will reply with depending on the input type:
// * []byte: the []byte it got
// * object: the marshalled object, in []byte form
// * nil: "{}" empty json, in case we aren't interested in the returned value, just the marshalled request
// - []byte: the []byte it got
// - object: the marshalled object, in []byte form
// - nil: "{}" empty json, in case we aren't interested in the returned value, just the marshalled request
//
// The marshalled request is available through s.rbody, s being the retuned server.
// It also returns a closing functions that has to be defer closed.
func echoServer(resp interface{}, t *testing.T) *mockAuthServer {
Expand Down
2 changes: 1 addition & 1 deletion db/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// 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
// 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,
Expand Down
31 changes: 26 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
module firebase.google.com/go/v4

go 1.15
go 1.17

require (
cloud.google.com/go/firestore v1.6.1
cloud.google.com/go/storage v1.21.0
golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a
google.golang.org/api v0.73.0
google.golang.org/appengine/v2 v2.0.1
cloud.google.com/go/storage v1.26.0
golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1
google.golang.org/api v0.96.0
google.golang.org/appengine/v2 v2.0.2
)

require (
cloud.google.com/go v0.102.1 // indirect
cloud.google.com/go/compute v1.7.0 // indirect
cloud.google.com/go/iam v0.3.0 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect
github.com/googleapis/gax-go/v2 v2.4.0 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c // indirect
google.golang.org/grpc v1.48.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)
Loading

0 comments on commit 2f8734e

Please sign in to comment.