Browse Source

Merge pull request #2 from jstnlef/minor-refactoring

Minor refactor to hasLeadingZeros
Benedikt Lang 12 years ago
parent
commit
f1812354c1
1 changed files with 1 additions and 7 deletions
  1. +1
    -7
      semver.go

+ 1
- 7
semver.go View File

@ -360,13 +360,7 @@ func containsOnly(s string, set string) bool {
}
func hasLeadingZeroes(s string) bool {
if len(s) <= 1 {
return false
}
if s[0] == '0' {
return true
}
return false
return len(s) > 1 && s[0] == '0'
}
// Creates a new valid build version


Loading…
Cancel
Save