Skip to content

Commit

Permalink
chore: go upgrade in workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mikouaj committed Dec 13, 2024
1 parent f9eb531 commit d407c1c
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
go-version: '1.23'
check-latest: true
- name: Get dependencies
run: go mod download
Expand All @@ -45,5 +45,5 @@ jobs:
- name: Lint
uses: dominikh/staticcheck-action@v1.3.1
with:
version: "2023.1.7"
version: "2024.1.1"
install-go: false
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
go-version: '1.23'
check-latest: true
- name: Get dependencies
run: go mod download
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
go-version: '1.23'
check-latest: true
- name: Import GPG key
id: import_gpg
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Requirements

* [Go](https://go.dev/doc/install) 1.22 or newer (to build the application)
* [Go](https://go.dev/doc/install) 1.23 or newer (to build the application)
* [GNU Make](https://www.gnu.org/software/make) (to build and test easier)
* [Open Policy Agent](https://www.openpolicyagent.org/docs/latest/#1-download-opa) (to test REGO policies)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Binaries for Linux, Windows and Mac are available as tarballs in the

### Source code

Go [v1.22](https://go.dev/doc/install) or newer is required. Check the [development guide](./DEVELOPMENT.md)
Go [v1.23](https://go.dev/doc/install) or newer is required. Check the [development guide](./DEVELOPMENT.md)
for more details.

```sh
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Binaries for Linux, Windows and Mac are available as tarballs in the

### Source code

Go [v1.22](https://go.dev/doc/install) or newer is required. Check the [development guide](../DEVELOPMENT.md)
Go [v1.23](https://go.dev/doc/install) or newer is required. Check the [development guide](../DEVELOPMENT.md)
for more details.

```sh
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ require (
go.opentelemetry.io/otel/sdk/metric v1.29.0 // indirect
go.opentelemetry.io/otel/trace v1.33.0 // indirect
golang.org/x/crypto v0.30.0 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/net v0.32.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/time v0.8.0 // indirect
golang.org/x/tools v0.26.0 // indirect
golang.org/x/tools v0.28.0 // indirect
google.golang.org/genproto v0.0.0-20241209162323-e6fa225c2576 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvx
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0=
golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down Expand Up @@ -416,8 +416,8 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ=
golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0=
golang.org/x/tools v0.28.0 h1:WuB6qZ4RPCQo5aP3WdKZS7i595EdWqWR8vqJTlwTVK8=
golang.org/x/tools v0.28.0/go.mod h1:dcIOrVd3mfQKTgrDVQHqCPMWy6lnhfhtX3hLXYVLfRw=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
4 changes: 2 additions & 2 deletions internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func (p *PolicyAutomationApp) ClusterJSONData() error {
return errors[0]
}
val, err := json.MarshalIndent(clusterData, "", " ")
log.Debugf("[DEBUG] cluster: " + string(val))
log.Debugf("[DEBUG] cluster: %s", string(val))

for _, cluster := range clusterData {

Expand All @@ -184,7 +184,7 @@ func (p *PolicyAutomationApp) ClusterJSONData() error {
if err != nil {
log.Debugf("could not format cluster details: %s", err)
}
log.Debugf("cluster: " + string(val))
log.Debugf("cluster: %s", string(val))

for _, dumpCollector := range p.clusterDumpCollectors {
log.Debugf("registering cluster data with cluster dump collector %s", reflect.TypeOf(dumpCollector).String())
Expand Down
2 changes: 1 addition & 1 deletion internal/app/app_check_clusters.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (p *PolicyAutomationApp) evaluateClusters(regoPackageBases []string) error
return errors[0]
}
val, _ := json.MarshalIndent(clusterData, "", " ")
log.Debugf("[DEBUG] cluster: " + string(val))
log.Debugf("[DEBUG] cluster: %s", string(val))

evalResults := &evaluationResults{}
for _, cluster := range clusterData {
Expand Down
8 changes: 4 additions & 4 deletions internal/app/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ func (p *PolicyAutomationApp) loadInputsConfig(config *cfg.Config) error {
if err := p.loadGKELocalInputConfig(config.Inputs.GKELocalInput); err != nil {
return err
}
if err := p.loadK8SApiInputConfig(config.Inputs.K8sAPI, config.CredentialsFile); err != nil {
if err := p.loadK8SApiInputConfig(config.Inputs.K8sAPI); err != nil {
return err
}
if err := p.loadMetricsAPIInputConfig(config.Inputs.MetricsAPI, config.CredentialsFile); err != nil {
if err := p.loadMetricsAPIInputConfig(config.Inputs.MetricsAPI); err != nil {
return err
}
return nil
Expand Down Expand Up @@ -114,7 +114,7 @@ func (p *PolicyAutomationApp) loadGKELocalInputConfig(config *cfg.GKELocalInput)
return nil
}

func (p *PolicyAutomationApp) loadK8SApiInputConfig(config *cfg.K8SAPIInput, credentialsFile string) error {
func (p *PolicyAutomationApp) loadK8SApiInputConfig(config *cfg.K8SAPIInput) error {
if config == nil || !config.Enabled {
return nil
}
Expand All @@ -128,7 +128,7 @@ func (p *PolicyAutomationApp) loadK8SApiInputConfig(config *cfg.K8SAPIInput, cre
return nil
}

func (p *PolicyAutomationApp) loadMetricsAPIInputConfig(config *cfg.MetricsAPIInput, credentialsFile string) error {
func (p *PolicyAutomationApp) loadMetricsAPIInputConfig(config *cfg.MetricsAPIInput) error {
if config == nil || !config.Enabled {
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion internal/app/app_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestLoadCliConfig_file(t *testing.T) {
func TestLoadCliConfig_with_validation(t *testing.T) {
validationErrMsg := "wrong validation"
validateFnMock := func(config cfg.Config) error {
return fmt.Errorf(validationErrMsg)
return fmt.Errorf("%s", validationErrMsg)
}
cliConfig := &CliConfig{}
pa := PolicyAutomationApp{ctx: context.Background()}
Expand Down
6 changes: 3 additions & 3 deletions internal/app/app_scc.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ func (p *PolicyAutomationApp) ConfigureSCC(orgNumber string) error {
consoleInfoColorF("GKE Policy Automation was not found in SCC, creating it..."),
)
log.Info("Creating GKE Policy Automation in SCC")
*id, err = cli.CreateSource()
newId, err := cli.CreateSource()
if err != nil {
p.out.ErrorPrint("could not create GKE Policy Automation source in SCC", err)
return err
}
p.out.Printf("%s %s\n",
outputs.IconMagnifier,
consoleInfoColorF("Created GKE Policy Automation in SCC... [%s]", *id),
consoleInfoColorF("Created GKE Policy Automation in SCC... [%s]", newId),
)
log.Infof("Created GKE Policy Automation in SCC: %s", *id)
log.Infof("Created GKE Policy Automation in SCC: %s", newId)
return nil
}

0 comments on commit d407c1c

Please sign in to comment.