Skip to content

Commit cfc5a95

Browse files
authored
Merge pull request #262 from cozystack/ci/golangci-lint-v2.14
ci: bump golangci-lint to v2.14.0
2 parents b08c591 + 61d9e7a commit cfc5a95

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

‎.github/workflows/pr.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Run golangci-lint
4444
uses: golangci/golangci-lint-action@v7
4545
with:
46-
version: v2.13.2
46+
version: v2.14.0
4747
args: --timeout=10m
4848

4949
dco:

‎pkg/commands/preflight_upgrade_verify.go‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,9 @@ func parseTargetVersion(image string) string {
149149
// suffix after `:`. Splitting on `/` first isolates that
150150
// component, so a registry port (`registry.local:5000`) in an
151151
// earlier path component cannot be mistaken for a tag separator.
152-
lastSlash := strings.LastIndex(image, "/")
153-
154152
tail := image
155-
if lastSlash >= 0 {
156-
tail = image[lastSlash+1:]
153+
if _, after, found := strings.CutLast(image, "/"); found {
154+
tail = after
157155
}
158156

159157
idx := strings.LastIndex(tail, ":")

0 commit comments

Comments
 (0)