Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rez1dent3 committed Sep 29, 2023
1 parent cb6a61e commit cb07b82
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/storage/uuid_field_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (u *UUIDFieldIndex) parseString(s string, enforceLength bool) ([]byte, erro
if enforceLength && l != 36 {
return nil, fmt.Errorf("UUID must be 36 characters")
} else if l > 36 {
return nil, fmt.Errorf("Invalid UUID length. UUID have 36 characters; got %d", l)
return nil, fmt.Errorf("invalid UUID length. UUID have 36 characters; got %d", l)
}

hyphens := strings.Count(s, "-")
Expand All @@ -79,12 +79,12 @@ func (u *UUIDFieldIndex) parseString(s string, enforceLength bool) ([]byte, erro
sanitized := strings.Replace(s, "-", "", -1)
sanitizedLength := len(sanitized)
if sanitizedLength%2 != 0 {
return nil, fmt.Errorf("Input (without hyphens) must be even length")
return nil, fmt.Errorf("input (without hyphens) must be even length")
}

dec, err := hex.DecodeString(sanitized)
if err != nil {
return nil, fmt.Errorf("Invalid UUID: %v", err)
return nil, fmt.Errorf("invalid UUID: %v", err)
}

return dec, nil
Expand Down

0 comments on commit cb07b82

Please sign in to comment.