Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lint warnings #11

Merged
merged 1 commit into from
May 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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