Skip to content

Commit 9a48753

Browse files
authored
Merge pull request #225 from platformsh/update-dependencies
Update dependencies, use Go 1.22 and stdlib slices
2 parents d84ff2c + 8fbb981 commit 9a48753

File tree

18 files changed

+151
-532
lines changed

18 files changed

+151
-532
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
with:
1919
# do not enable cache here, because golangci-linter
2020
# has its own internal cache with better performance
21-
go-version: 1.20.x
21+
go-version: 1.22.x
2222

2323
- name: Run linter
2424
uses: golangci/golangci-lint-action@v3
2525
with:
26-
version: v1.52
26+
version: v1.59
2727

2828
- name: Run tests
2929
run: make test
@@ -41,7 +41,7 @@ jobs:
4141
- name: Setup Go
4242
uses: actions/setup-go@v3
4343
with:
44-
go-version: 1.20.x
44+
go-version: 1.22.x
4545
cache: true
4646

4747
- name: Run GoReleaser
@@ -73,7 +73,7 @@ jobs:
7373
- name: Setup Go
7474
uses: actions/setup-go@v3
7575
with:
76-
go-version: 1.20.x
76+
go-version: 1.22.x
7777
cache: true
7878

7979
- name: Run GoReleaser

.golangci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ linters:
5959
# checks whether HTTP response body is closed successfully
6060
- bodyclose
6161
# Go linter that checks if package imports are in a list of acceptable packages
62-
- depguard
62+
# - depguard
6363
# Checks assignments with too many blank identifiers (e.g. x, , , _, := f())
6464
- dogsled
6565
# Tool for code clone detection
@@ -157,6 +157,6 @@ issues:
157157
source: "^//go:generate "
158158

159159
# golangci.com configuration
160-
# https://github.com/golangci/golangci/wiki/Configuration
160+
# https://github.com/golangci/golangci-lint-action?tab=readme-ov-file#how-to-use
161161
service:
162-
golangci-lint-version: 1.52.x # use the fixed version to not introduce new linters unexpectedly
162+
golangci-lint-version: 1.59.x # use the fixed version to not introduce new linters unexpectedly

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ test: generate ## Run unit tests
88

99
.PHONY: lint
1010
lint: ## Run linter
11-
command -v golangci-lint >/dev/null || go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52
11+
command -v golangci-lint >/dev/null || go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59
1212
golangci-lint run --timeout=10m --verbose
1313

1414
.PHONY: generate

commands/platformify.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func NewPlatformifyCmd(assets *vendorization.VendorAssets) *cobra.Command {
2525
Short: fmt.Sprintf("Creates starter YAML files for your %s project", assets.ServiceName),
2626
SilenceUsage: true,
2727
SilenceErrors: true,
28-
RunE: func(cmd *cobra.Command, args []string) error {
28+
RunE: func(cmd *cobra.Command, _ []string) error {
2929
answers := models.NewAnswers()
3030
answers.Flavor, _ = cmd.Context().Value(FlavorKey).(string)
3131
ctx := models.ToContext(cmd.Context(), answers)

commands/validate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func NewValidateCommand(assets *vendorization.VendorAssets) *cobra.Command {
2323
"This will check your git repository and validate your files.",
2424
assets.ServiceName,
2525
),
26-
RunE: func(cmd *cobra.Command, args []string) error {
26+
RunE: func(cmd *cobra.Command, _ []string) error {
2727
cwd, err := os.Getwd()
2828
if err != nil {
2929
fmt.Fprintln(

go.mod

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,55 @@
11
module github.com/platformsh/platformify
22

3-
go 1.20
3+
go 1.22
44

55
require (
6-
github.com/AlecAivazis/survey/v2 v2.3.6
6+
github.com/AlecAivazis/survey/v2 v2.3.7
77
github.com/Masterminds/sprig/v3 v3.2.3
8-
github.com/golang/mock v1.4.4
9-
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b
10-
github.com/pelletier/go-toml/v2 v2.0.6
11-
github.com/spf13/cobra v1.6.1
12-
github.com/spf13/viper v1.15.0
13-
github.com/stretchr/testify v1.8.1
8+
github.com/golang/mock v1.6.0
9+
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
10+
github.com/pelletier/go-toml/v2 v2.2.2
11+
github.com/spf13/cobra v1.8.1
12+
github.com/spf13/viper v1.19.0
13+
github.com/stretchr/testify v1.9.0
1414
github.com/xeipuuv/gojsonschema v1.2.0
15-
golang.org/x/exp v0.0.0-20230321023759-10a507213a29
1615
gopkg.in/yaml.v3 v3.0.1
1716
)
1817

1918
require (
2019
github.com/Masterminds/goutils v1.1.1 // indirect
21-
github.com/Masterminds/semver/v3 v3.2.0 // indirect
22-
github.com/davecgh/go-spew v1.1.1 // indirect
23-
github.com/fsnotify/fsnotify v1.6.0 // indirect
24-
github.com/google/uuid v1.1.2 // indirect
20+
github.com/Masterminds/semver/v3 v3.2.1 // indirect
21+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
22+
github.com/fsnotify/fsnotify v1.7.0 // indirect
23+
github.com/google/uuid v1.6.0 // indirect
2524
github.com/hashicorp/hcl v1.0.0 // indirect
26-
github.com/huandu/xstrings v1.4.0 // indirect
27-
github.com/imdario/mergo v0.3.13 // indirect
28-
github.com/inconshreveable/mousetrap v1.0.1 // indirect
25+
github.com/huandu/xstrings v1.5.0 // indirect
26+
github.com/imdario/mergo v0.3.16 // indirect
27+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
2928
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
3029
github.com/magiconair/properties v1.8.7 // indirect
31-
github.com/mattn/go-colorable v0.1.12 // indirect
32-
github.com/mattn/go-isatty v0.0.14 // indirect
33-
github.com/mitchellh/copystructure v1.0.0 // indirect
30+
github.com/mattn/go-colorable v0.1.13 // indirect
31+
github.com/mattn/go-isatty v0.0.20 // indirect
32+
github.com/mitchellh/copystructure v1.2.0 // indirect
3433
github.com/mitchellh/mapstructure v1.5.0 // indirect
3534
github.com/mitchellh/reflectwalk v1.0.2 // indirect
36-
github.com/pmezard/go-difflib v1.0.0 // indirect
37-
github.com/shopspring/decimal v1.2.0 // indirect
38-
github.com/spf13/afero v1.9.3 // indirect
39-
github.com/spf13/cast v1.5.0 // indirect
40-
github.com/spf13/jwalterweatherman v1.1.0 // indirect
35+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
36+
github.com/sagikazarmark/locafero v0.6.0 // indirect
37+
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
38+
github.com/shopspring/decimal v1.4.0 // indirect
39+
github.com/sourcegraph/conc v0.3.0 // indirect
40+
github.com/spf13/afero v1.11.0 // indirect
41+
github.com/spf13/cast v1.6.0 // indirect
4142
github.com/spf13/pflag v1.0.5 // indirect
42-
github.com/subosito/gotenv v1.4.2 // indirect
43-
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
43+
github.com/subosito/gotenv v1.6.0 // indirect
44+
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
4445
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
45-
golang.org/x/crypto v0.3.0 // indirect
46-
golang.org/x/sys v0.4.0 // indirect
47-
golang.org/x/term v0.2.0 // indirect
48-
golang.org/x/text v0.5.0 // indirect
46+
go.uber.org/multierr v1.11.0 // indirect
47+
golang.org/x/crypto v0.24.0 // indirect
48+
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect
49+
golang.org/x/sys v0.21.0 // indirect
50+
golang.org/x/term v0.21.0 // indirect
51+
golang.org/x/text v0.16.0 // indirect
4952
gopkg.in/ini.v1 v1.67.0 // indirect
5053
)
54+
55+
replace github.com/imdario/mergo => github.com/imdario/mergo v0.3.16

0 commit comments

Comments
 (0)