Skip to content

Commit

Permalink
Fix lint issues (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
vanni-giachin committed May 21, 2023
1 parent 3fff7eb commit 3dacaac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion colors.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

var (
// ErrBadColor is the default bad color error
ErrBadColor = errors.New("Parsing of color failed, Bad Color")
ErrBadColor = errors.New("parsing of color failed, Bad Color")
)

// Color is the base color interface from which all others ascribe to
Expand Down
4 changes: 2 additions & 2 deletions rgb.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ func ParseRGB(s string) (*RGBColor, error) {
var isPercent bool
vals := rgbCaptureRegex.FindAllStringSubmatch(s, -1)

if vals == nil || len(vals) == 0 || len(vals[0]) == 0 {
if len(vals) == 0 || len(vals[0]) == 0 {

vals = rgbCapturePercentRegex.FindAllStringSubmatch(s, -1)

if vals == nil || len(vals) == 0 || len(vals[0]) == 0 {
if len(vals) == 0 || len(vals[0]) == 0 {
return nil, ErrBadColor
}

Expand Down
4 changes: 2 additions & 2 deletions rgba.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ func ParseRGBA(s string) (*RGBAColor, error) {

vals := rgbaCaptureRegex.FindAllStringSubmatch(s, -1)

if vals == nil || len(vals) == 0 || len(vals[0]) == 0 {
if len(vals) == 0 || len(vals[0]) == 0 {

vals = rgbaCapturePercentRegex.FindAllStringSubmatch(s, -1)

if vals == nil || len(vals) == 0 || len(vals[0]) == 0 {
if len(vals) == 0 || len(vals[0]) == 0 {
return nil, ErrBadColor
}

Expand Down

0 comments on commit 3dacaac

Please sign in to comment.