Skip to content

Commit 613f968

Browse files
chore(deps): update dependencies (#51)
* update sprig * fix linting * fix(lint): update linter --------- Co-authored-by: I503834 <jan.fokken@sap.com>
1 parent 23822cb commit 613f968

File tree

10 files changed

+165
-573
lines changed

10 files changed

+165
-573
lines changed

.buildvars.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
go_version: "1.20"
2-
golangci_version: v1.52.2
2+
golangci_version: v1.55.2
33
goreleaser_version: v1.16.2
44

5-
coverage_min: 80
5+
coverage_min: 80

.golangci.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,16 @@ run:
33
tests: true
44
skip-dirs-use-default: true
55
skip-files:
6-
- ".*tmp/.*.go$"
6+
- ".*tmp/.*.go$"
77
linters-settings:
88
depguard:
9-
list-type: denylist
10-
packages:
11-
# logging is allowed only by logutils.Log, logrus
12-
# is allowed to use only in logutils package
13-
- github.com/sirupsen/logrus
14-
- logutils.Log
15-
packages-with-error-message:
16-
- github.com/sirupsen/logrus: "logging is allowed only by the local log package"
17-
- logutils.Log: "logging is allowed only by the local log package"
9+
rules:
10+
main:
11+
deny:
12+
- pkg: "github.com/sirupsen/logrus"
13+
desc: "logging is allowed only by the local log package"
14+
- pkg: "logutils.Log"
15+
desc: "logging is allowed only by the local log package"
1816
dupl:
1917
threshold: 100
2018
funlen:
@@ -47,10 +45,10 @@ linters-settings:
4745
- condition
4846
- return
4947
ignored-numbers:
50-
- '0'
51-
- '1'
52-
- '2'
53-
- '3'
48+
- "0"
49+
- "1"
50+
- "2"
51+
- "3"
5452
ignored-functions:
5553
- strings.SplitN
5654
revive:
@@ -124,4 +122,4 @@ linters:
124122
# - nestif
125123
# - prealloc
126124
# - testpackage
127-
# - wsl
125+
# - wsl

cmd/coco/commands/root.go

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"os"
66
"path/filepath"
77

8-
"github.com/SAP/configuration-tools-for-gitops/v2/pkg/git"
98
"github.com/SAP/configuration-tools-for-gitops/v2/pkg/log"
109
"github.com/SAP/configuration-tools-for-gitops/v2/pkg/version"
1110
"github.com/spf13/cobra"
@@ -152,13 +151,8 @@ func initConfig() {
152151
}
153152

154153
if ok := consistentGitSetup(
155-
viper.GetString(gitPathKey),
156154
viper.GetString(gitURLKey),
157-
viper.GetString("git-token"),
158155
viper.GetString(gitRemoteKey),
159-
viper.GetString("git.defaultBranch"),
160-
overWriteGitDepth, // viper.GetInt(gitDepth),
161-
logLvl,
162156
); !ok {
163157
os.Exit(1)
164158
}
@@ -176,9 +170,7 @@ func initConfig() {
176170
}
177171
}
178172

179-
func consistentGitSetup(
180-
path, url, token, remote, defaultBranch string, gitDepth int, logLvl log.Level,
181-
) bool {
173+
func consistentGitSetup(url, remote string) bool {
182174
if remote == "" {
183175
return true
184176
}
@@ -197,14 +189,6 @@ func consistentGitSetup(
197189
)
198190
return false
199191
}
200-
if _, err := git.New(
201-
path, url, token, remote, defaultBranch, gitDepth, logLvl,
202-
); err != nil {
203-
log.Sugar.Errorf(
204-
"failed to validate repository in path \"%s\": %s", path, err,
205-
)
206-
return false
207-
}
208192
return true
209193
}
210194

cmd/coco/dependencies/graph.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func constructGraph(path, depFileName string) (
3939
) {
4040
fs, err := dependencies(path, depFileName, []string{}, []string{}, []string{})
4141
if err != nil {
42-
return
42+
return nil, nil, err
4343
}
4444

4545
downToUp = make(g.DownToUp, len(fs))

cmd/coco/generate/templatefunctions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"strings"
55
gotemplate "text/template"
66

7-
"github.com/Masterminds/sprig"
7+
"github.com/Masterminds/sprig/v3"
88
)
99

1010
func tmplFuncs() gotemplate.FuncMap {

go.mod

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,66 +3,69 @@ module github.com/SAP/configuration-tools-for-gitops/v2
33
go 1.20
44

55
require (
6-
github.com/Masterminds/sprig v2.22.0+incompatible
7-
github.com/fatih/color v1.15.0
8-
github.com/go-git/go-billy/v5 v5.4.1
9-
github.com/go-git/go-git/v5 v5.7.0
6+
github.com/Masterminds/sprig/v3 v3.2.3
7+
github.com/fatih/color v1.16.0
8+
github.com/go-git/go-billy/v5 v5.5.0
9+
github.com/go-git/go-git/v5 v5.11.0
1010
github.com/google/go-github/v51 v51.0.0
11-
github.com/spf13/cobra v1.7.0
11+
github.com/spf13/cobra v1.8.0
1212
github.com/spf13/pflag v1.0.5
13-
github.com/spf13/viper v1.16.0
13+
github.com/spf13/viper v1.18.2
1414
github.com/yourbasic/graph v0.0.0-20210606180040-8ecfec1c2869
15-
go.uber.org/zap v1.24.0
16-
golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb
17-
golang.org/x/oauth2 v0.9.0
18-
golang.org/x/sys v0.13.0
15+
go.uber.org/zap v1.26.0
16+
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b
17+
golang.org/x/oauth2 v0.15.0
18+
golang.org/x/sys v0.15.0
1919
gopkg.in/yaml.v3 v3.0.1
2020
)
2121

2222
require (
23+
dario.cat/mergo v1.0.0 // indirect
2324
github.com/Masterminds/goutils v1.1.1 // indirect
24-
github.com/Masterminds/semver v1.5.0 // indirect
25+
github.com/Masterminds/semver/v3 v3.2.1 // indirect
2526
github.com/Microsoft/go-winio v0.6.1 // indirect
26-
github.com/ProtonMail/go-crypto v0.0.0-20230626094100-7e9e0395ebec // indirect
27-
github.com/acomagu/bufpipe v1.0.4 // indirect
28-
github.com/cloudflare/circl v1.3.3 // indirect
27+
github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c // indirect
28+
github.com/cloudflare/circl v1.3.7 // indirect
29+
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
2930
github.com/emirpasic/gods v1.18.1 // indirect
30-
github.com/fsnotify/fsnotify v1.6.0 // indirect
31+
github.com/fsnotify/fsnotify v1.7.0 // indirect
3132
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
3233
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
3334
github.com/golang/protobuf v1.5.3 // indirect
3435
github.com/google/go-querystring v1.1.0 // indirect
35-
github.com/google/uuid v1.3.0 // indirect
36+
github.com/google/uuid v1.5.0 // indirect
3637
github.com/hashicorp/hcl v1.0.0 // indirect
3738
github.com/huandu/xstrings v1.4.0 // indirect
38-
github.com/imdario/mergo v0.3.16 // indirect
39+
github.com/imdario/mergo v0.3.11 // indirect
3940
github.com/inconshreveable/mousetrap v1.1.0 // indirect
4041
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
4142
github.com/kevinburke/ssh_config v1.2.0 // indirect
4243
github.com/magiconair/properties v1.8.7 // indirect
4344
github.com/mattn/go-colorable v0.1.13 // indirect
44-
github.com/mattn/go-isatty v0.0.19 // indirect
45+
github.com/mattn/go-isatty v0.0.20 // indirect
4546
github.com/mitchellh/copystructure v1.2.0 // indirect
4647
github.com/mitchellh/mapstructure v1.5.0 // indirect
4748
github.com/mitchellh/reflectwalk v1.0.2 // indirect
48-
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
49+
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
4950
github.com/pjbgf/sha1cd v0.3.0 // indirect
51+
github.com/sagikazarmark/locafero v0.4.0 // indirect
52+
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
5053
github.com/sergi/go-diff v1.3.1 // indirect
51-
github.com/skeema/knownhosts v1.1.1 // indirect
52-
github.com/spf13/afero v1.9.5 // indirect
53-
github.com/spf13/cast v1.5.1 // indirect
54-
github.com/spf13/jwalterweatherman v1.1.0 // indirect
55-
github.com/subosito/gotenv v1.4.2 // indirect
54+
github.com/shopspring/decimal v1.3.1 // indirect
55+
github.com/skeema/knownhosts v1.2.1 // indirect
56+
github.com/sourcegraph/conc v0.3.0 // indirect
57+
github.com/spf13/afero v1.11.0 // indirect
58+
github.com/spf13/cast v1.6.0 // indirect
59+
github.com/subosito/gotenv v1.6.0 // indirect
5660
github.com/xanzy/ssh-agent v0.3.3 // indirect
57-
go.uber.org/atomic v1.11.0 // indirect
5861
go.uber.org/multierr v1.11.0 // indirect
59-
golang.org/x/crypto v0.14.0 // indirect
60-
golang.org/x/mod v0.11.0 // indirect
61-
golang.org/x/net v0.17.0 // indirect
62-
golang.org/x/text v0.13.0 // indirect
63-
golang.org/x/tools v0.10.0 // indirect
64-
google.golang.org/appengine v1.6.7 // indirect
65-
google.golang.org/protobuf v1.31.0 // indirect
62+
golang.org/x/crypto v0.17.0 // indirect
63+
golang.org/x/mod v0.14.0 // indirect
64+
golang.org/x/net v0.19.0 // indirect
65+
golang.org/x/text v0.14.0 // indirect
66+
golang.org/x/tools v0.16.1 // indirect
67+
google.golang.org/appengine v1.6.8 // indirect
68+
google.golang.org/protobuf v1.32.0 // indirect
6669
gopkg.in/ini.v1 v1.67.0 // indirect
6770
gopkg.in/warnings.v0 v0.1.2 // indirect
6871
)

0 commit comments

Comments
 (0)