Skip to content

Commit

Permalink
Simplify code per golangci-lint recommendation
Browse files Browse the repository at this point in the history
  • Loading branch information
autarch committed Mar 5, 2020
1 parent 4d37983 commit 7d92a8f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/version/perl.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,7 @@ func removeLeadingZeros(s string) string {
}

func parsePerlVStringVersion(version string) (*Version, error) {
if strings.HasPrefix(version, "v") {
version = version[1:]
}
version = strings.TrimPrefix(version, "v")
version = strings.ReplaceAll(version, "_", "")
segments := strings.Split(version, ".")
for i, s := range segments {
Expand Down

0 comments on commit 7d92a8f

Please sign in to comment.