Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to go 1.19. #454

Merged
merged 6 commits into from
Nov 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.19
- uses: actions/checkout@v3
- name: Run golangci-lint
uses: golangci/[email protected]
with:
args: --timeout 3m --verbose
version: v1.46.2
version: v1.50.1
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
&& sudo cp conftest /usr/local/bin/conftest
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.19
- uses: actions/checkout@v3
- run: make test-all
6 changes: 4 additions & 2 deletions cmd/help_fmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ import (
// usageTmpl returns a cobra-compatible usage template that will be printed
// during the help output.
// This template prints help like:
// --name=<value>
// <description>
//
// --name=<value>
// <description>
//
// We use it over the default template so that the output it easier to read.
func usageTmpl(stringFlags map[string]stringFlag, intFlags map[string]intFlag, boolFlags map[string]boolFlag) string {
var flagNames []string
Expand Down
3 changes: 1 addition & 2 deletions cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ package cmd

import (
"fmt"
"io/ioutil"
"net/url"
"os"
"path/filepath"
Expand Down Expand Up @@ -959,7 +958,7 @@ func isValidLogLevel(level string) bool {
}

func createGHAppConfig(userConfig server.UserConfig) (githubapp.Config, error) {
privateKey, err := ioutil.ReadFile(userConfig.GithubAppKeyFile)
privateKey, err := os.ReadFile(userConfig.GithubAppKeyFile)
if err != nil {
return githubapp.Config{}, err
}
Expand Down
5 changes: 2 additions & 3 deletions cmd/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ package cmd

import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"reflect"
Expand Down Expand Up @@ -797,12 +796,12 @@ func setupWithDefaults(flags map[string]interface{}, t *testing.T) *cobra.Comman
}

func tempFile(t *testing.T, contents string) string {
f, err := ioutil.TempFile("", "")
f, err := os.CreateTemp("", "")
Ok(t, err)
newName := f.Name() + ".yaml"
err = os.Rename(f.Name(), newName)
Ok(t, err)
ioutil.WriteFile(newName, []byte(contents), 0600) // nolint: errcheck
os.WriteFile(newName, []byte(contents), 0600) // nolint: errcheck
return newName
}

Expand Down
3 changes: 1 addition & 2 deletions e2e/e2e.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ package main

import (
"fmt"
"io/ioutil"
"log"
"os"
"os/exec"
Expand Down Expand Up @@ -78,7 +77,7 @@ func (t *E2ETester) Start() (*E2EResult, error) {
randomData := []byte(testFileData)
filePath := fmt.Sprintf("%s/%s/%s", cloneDir, t.projectType.Name, testFileName)
log.Printf("creating file to commit %q", filePath)
err := ioutil.WriteFile(filePath, randomData, 0644)
err := os.WriteFile(filePath, randomData, 0644)
if err != nil {
return e2eResult, fmt.Errorf("couldn't write file %s: %v", filePath, err)
}
Expand Down
29 changes: 19 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/runatlantis/atlantis

go 1.17
go 1.19

replace google.golang.org/grpc => google.golang.org/grpc v1.45.0

Expand Down Expand Up @@ -89,7 +89,7 @@ require (
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.8.1
github.com/stretchr/testify v1.7.1
github.com/stretchr/testify v1.8.1
github.com/subosito/gotenv v1.2.0 // indirect
github.com/thomaspoignant/go-feature-flag v0.18.4
github.com/ulikunitz/xz v0.5.8 // indirect
Expand All @@ -102,15 +102,15 @@ require (
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.19.0
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
golang.org/x/net v0.0.0-20220531201128-c960675eff93 // indirect
golang.org/x/mod v0.6.0 // indirect
golang.org/x/net v0.1.0 // indirect
golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602 // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/sys v0.1.0 // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
golang.org/x/tools v0.1.10 // indirect
golang.org/x/tools v0.2.1-0.20221101170700-b5bc717366b2 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/api v0.44.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
Expand Down Expand Up @@ -148,12 +148,21 @@ require (
)

require (
github.com/BurntSushi/toml v1.2.0 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/bradleyfalzon/ghinstallation/v2 v2.1.0 // indirect
github.com/golang-jwt/jwt/v4 v4.4.1 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rs/zerolog v1.27.0 // indirect
github.com/sergi/go-diff v1.1.0 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/exp/typeparams v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/tools/gopls v0.10.1 // indirect
golang.org/x/vuln v0.0.0-20221010193109-563322be2ea9 // indirect
honnef.co/go/tools v0.3.3 // indirect
mvdan.cc/gofumpt v0.3.1 // indirect
mvdan.cc/xurls/v2 v2.4.0 // indirect
)

require (
Expand All @@ -178,8 +187,8 @@ require (
github.com/palantir/go-githubapp v0.13.1
github.com/pborman/uuid v1.2.1 // indirect
github.com/robfig/cron v1.2.0 // indirect
github.com/stretchr/objx v0.3.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
go.temporal.io/api v1.8.0 // indirect
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
golang.org/x/term v0.1.0
)
Loading