Skip to content

Commit

Permalink
Update to go 1.23 (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
carabasdaniel authored Oct 10, 2024
1 parent 365ebc4 commit 822f478
Show file tree
Hide file tree
Showing 8 changed files with 131 additions and 65 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ on:
- release-*
env:
PRE_RELEASE: ${{ github.ref == 'refs/heads/main' && 'development' || '' }}
GO_VERSION: "1.22"
GO_RELEASER_VERSION: "v1.24.0"
GO_LANGCI_LINT_VERSION: "v1.56.2"
GO_VERSION: "1.23"
GO_RELEASER_VERSION: "v2.3.2"
GO_LANGCI_LINT_VERSION: "v1.61.0"
GO_TESTSUM_VERSION: "1.11.0"

jobs:
Expand Down
26 changes: 7 additions & 19 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ linters-settings:
lines: 100
statements: 80
gci:
local-prefixes: github.com/golangci/golangci-lint
prefix: github.com/golangci/golangci-lint
goconst:
min-len: 2
min-occurrences: 2
Expand All @@ -36,20 +36,11 @@ linters-settings:
gocyclo:
min-complexity: 18
goimports:
local-prefixes: github.com/golangci/golangci-lint
prefix: github.com/golangci/golangci-lint
golint:
min-confidence: 0
gomnd:
settings:
mnd:
# don't include the "operation" and "assign"
checks:
- argument
- case
- condition
- return
min-confidence: 0
govet:
check-shadowing: true
shadow: true
settings:
printf:
funcs:
Expand All @@ -74,16 +65,15 @@ linters:
- asciicheck
- bodyclose
- dogsled
- errcheck
- exportloopref
- errcheck
- exhaustive
- funlen
- gochecknoinits
- goconst
- gocritic
- gocyclo
- godot
- goerr113
- err113
- gofmt
- goimports
- goprintffuncname
Expand Down Expand Up @@ -154,6 +144,4 @@ issues:
- gosec

run:
timeout: 5m
skip-dirs:
- pkg/testharness/testdata
timeout: 5m
3 changes: 2 additions & 1 deletion .goreleaser-pre.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
project_name: policy

env:
Expand Down Expand Up @@ -54,7 +55,7 @@ checksum:

snapshot:
# https://goreleaser.com/customization/snapshots/
name_template: "{{ .Tag }}"
version_template: "{{ .Tag }}"

source:
# https://goreleaser.com/customization/source/
Expand Down
3 changes: 2 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
project_name: policy

env:
Expand Down Expand Up @@ -54,7 +55,7 @@ checksum:

snapshot:
# https://goreleaser.com/customization/snapshots/
name_template: "{{ .Tag }}"
version_template: "{{ .Tag }}"

source:
# https://goreleaser.com/customization/source/
Expand Down
70 changes: 35 additions & 35 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ go 1.21

require (
github.com/Masterminds/sprig v2.22.0+incompatible
github.com/alecthomas/kong v0.9.0
github.com/alecthomas/kong v1.2.1
github.com/aserto-dev/clui v0.8.3
github.com/aserto-dev/logger v0.0.6
github.com/aserto-dev/runtime v0.69.0
github.com/aserto-dev/runtime v0.69.1
github.com/aserto-dev/scc-lib v0.1.2
github.com/containerd/containerd v1.7.22
github.com/containerd/errdefs v0.2.0
github.com/containerd/errdefs v0.3.0
github.com/distribution/reference v0.6.0
github.com/docker/cli v27.0.3+incompatible
github.com/docker/cli v27.3.1+incompatible
github.com/dustin/go-humanize v1.0.1
github.com/google/wire v0.6.0
github.com/magefile/mage v1.15.0
github.com/mitchellh/mapstructure v1.5.0
github.com/opcr-io/oras-go/v2 v2.0.0-20231122155130-eb4260d8a0ae
github.com/opcr-io/policy/oci v0.2.7-0.20240517114530-d694cb7fb57f
github.com/opcr-io/policy/parser v0.2.5-0.20231122153628-152ef46de97b
github.com/opcr-io/policy/oci v0.2.16
github.com/opcr-io/policy/parser v0.2.16
github.com/open-policy-agent/opa v0.69.0
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.1.0
Expand All @@ -28,12 +28,12 @@ require (
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
golang.org/x/sync v0.8.0
golang.org/x/term v0.24.0
sigs.k8s.io/controller-runtime v0.17.3
golang.org/x/term v0.25.0
sigs.k8s.io/controller-runtime v0.19.0
)

require (
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/OneOfOne/xxhash v1.2.8 // indirect
Expand All @@ -44,8 +44,8 @@ require (
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/platforms v0.2.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/docker/docker-credential-helpers v0.7.0 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/docker/docker-credential-helpers v0.8.2 // indirect
github.com/fatih/color v1.17.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-ini/ini v1.67.0 // indirect
Expand All @@ -59,56 +59,56 @@ require (
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/huandu/xstrings v1.5.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/klauspost/compress v1.17.10 // indirect
github.com/kyokomi/emoji v2.2.4+incompatible // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/locker v1.0.1 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/peterh/liner v1.2.2 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.20.4 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/common v0.60.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/sagikazarmark/locafero v0.6.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tchap/go-patricia/v2 v2.3.1 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/yashtewari/glob-intersection v0.2.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/sdk v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 // indirect
go.opentelemetry.io/otel v1.30.0 // indirect
go.opentelemetry.io/otel/metric v1.30.0 // indirect
go.opentelemetry.io/otel/sdk v1.30.0 // indirect
go.opentelemetry.io/otel/trace v1.30.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/exp v0.0.0-20240707233637-46b078467d37 // indirect
golang.org/x/mod v0.19.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/time v0.6.0 // indirect
golang.org/x/tools v0.23.0 // indirect
google.golang.org/grpc v1.67.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
golang.org/x/time v0.7.0 // indirect
golang.org/x/tools v0.26.0 // indirect
google.golang.org/grpc v1.67.1 // indirect
google.golang.org/protobuf v1.35.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading

0 comments on commit 822f478

Please sign in to comment.