Skip to content

Commit 707a481

Browse files
committed
conform error strings with staticcheck
1 parent b0f0f77 commit 707a481

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

constraint.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ func (c *Constraint) String() string {
178178
func parseSingle(v string) (*Constraint, error) {
179179
matches := constraintRegexp.FindStringSubmatch(v)
180180
if matches == nil {
181-
return nil, fmt.Errorf("Malformed constraint: %s", v)
181+
return nil, fmt.Errorf("malformed constraint: %s", v)
182182
}
183183

184184
check, err := NewVersion(matches[2])

version.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ func NewSemver(v string) (*Version, error) {
6363
func newVersion(v string, pattern *regexp.Regexp) (*Version, error) {
6464
matches := pattern.FindStringSubmatch(v)
6565
if matches == nil {
66-
return nil, fmt.Errorf("Malformed version: %s", v)
66+
return nil, fmt.Errorf("malformed version: %s", v)
6767
}
6868
segmentsStr := strings.Split(matches[1], ".")
6969
segments := make([]int64, len(segmentsStr))
7070
for i, str := range segmentsStr {
7171
val, err := strconv.ParseInt(str, 10, 64)
7272
if err != nil {
7373
return nil, fmt.Errorf(
74-
"Error parsing version: %s", err)
74+
"error parsing version: %s", err)
7575
}
7676

7777
segments[i] = val

0 commit comments

Comments
 (0)