Skip to content

Commit

Permalink
fixes gocritic: importShadow: shadow of imported from 'github.com/has…
Browse files Browse the repository at this point in the history
…hicorp/go-version' package 'version'
  • Loading branch information
Maed223 committed Oct 31, 2024
1 parent ef82ec7 commit 4fb3d9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions disco/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 412,10 @@ func parseServiceID(id string) (string, *version.Version, error) {
return "", nil, fmt.Errorf("Invalid service ID format (i.e. service.vN): %s", id)
}

version, err := version.NewVersion(parts[1])
parsedVersion, err := version.NewVersion(parts[1])
if err != nil {
return "", nil, fmt.Errorf("Invalid service version: %v", err)
}

return parts[0], version, nil
return parts[0], parsedVersion, nil
}

0 comments on commit 4fb3d9c

Please sign in to comment.