Skip to content

Commit

Permalink
Merge pull request #35 from fredbi/golangci-lint
Browse files Browse the repository at this point in the history
Linting
  • Loading branch information
casualjim committed Oct 27, 2018
2 parents edab999 + 53354ba commit 81f5045
Show file tree
Hide file tree
Showing 6 changed files with 193 additions and 567 deletions.
5 changes: 3 additions & 2 deletions .golangci.yml
Expand Up @@ -4,16 +4,17 @@ linters-settings:
golint:
min-confidence: 0
gocyclo:
min-complexity: 25
min-complexity: 30
maligned:
suggest-new: true
dupl:
threshold: 100
goconst:
min-len: 2
min-occurrences: 2
min-occurrences: 4

linters:
enable-all: true
disable:
- maligned
- lll
2 changes: 1 addition & 1 deletion date_test.go
Expand Up @@ -77,7 +77,7 @@ func TestDate_Scan(t *testing.T) {
values := []interface{}{str, []byte(str), ref}
for _, value := range values {
result := Date{}
(&result).Scan(value)
_ = (&result).Scan(value)
assert.Equal(t, date, result, "value: %#v", value)
}

Expand Down
10 changes: 2 additions & 8 deletions default.go
Expand Up @@ -112,7 +112,7 @@ func IsUUID5(str string) bool {
return rxUUID5.MatchString(str)
}

// Validates an email address.
// IsEmail validates an email address.
func IsEmail(str string) bool {
addr, e := mail.ParseAddress(str)
return e == nil && addr.Address != ""
Expand Down Expand Up @@ -197,13 +197,7 @@ func init() {
Default.Add("password", &pw, func(_ string) bool { return true })
}

/* unused:
var formatCheckers = map[string]Validator{
"byte": govalidator.IsBase64,
}
*/

// Base64 represents a base64 encoded string
// Base64 represents a base64 encoded string, using URLEncoding alphabet
//
// swagger:strfmt byte
type Base64 []byte
Expand Down

0 comments on commit 81f5045

Please sign in to comment.