Skip to content
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
31 changes: 13 additions & 18 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
linters-settings:
govet:
check-shadowing: true
golint:
min-confidence: 0
gocyclo:
min-complexity: 45
maligned:
suggest-new: true
dupl:
threshold: 200
goconst:
Expand All @@ -16,7 +10,7 @@ linters-settings:
linters:
enable-all: true
disable:
- maligned
- recvcheck
- unparam
- lll
- gochecknoinits
Expand All @@ -29,17 +23,13 @@ linters:
- wrapcheck
- testpackage
- nlreturn
- gomnd
- exhaustivestruct
- goerr113
- errorlint
- nestif
- godot
- gofumpt
- paralleltest
- tparallel
- thelper
- ifshort
- exhaustruct
- varnamelen
- gci
Expand All @@ -52,10 +42,15 @@ linters:
- forcetypeassert
- cyclop
# deprecated linters
- deadcode
- interfacer
- scopelint
- varcheck
- structcheck
- golint
- nosnakecase
#- deadcode
#- interfacer
#- scopelint
#- varcheck
#- structcheck
#- golint
#- nosnakecase
#- maligned
#- goerr113
#- ifshort
#- gomnd
#- exhaustivestruct
2 changes: 1 addition & 1 deletion bson.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (id *ObjectId) Scan(raw interface{}) error {
case string:
data = []byte(v)
default:
return fmt.Errorf("cannot sql.Scan() strfmt.URI from: %#v", v)
return fmt.Errorf("cannot sql.Scan() strfmt.URI from: %#v: %w", v, ErrFormat)
}

return id.UnmarshalText(data)
Expand Down
5 changes: 2 additions & 3 deletions date.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package strfmt
import (
"database/sql/driver"
"encoding/json"
"errors"
"fmt"
"time"

Expand Down Expand Up @@ -84,7 +83,7 @@ func (d *Date) Scan(raw interface{}) error {
*d = Date{}
return nil
default:
return fmt.Errorf("cannot sql.Scan() strfmt.Date from: %#v", v)
return fmt.Errorf("cannot sql.Scan() strfmt.Date from: %#v: %w", v, ErrFormat)
}
}

Expand Down Expand Up @@ -134,7 +133,7 @@ func (d *Date) UnmarshalBSON(data []byte) error {
return nil
}

return errors.New("couldn't unmarshal bson bytes value as Date")
return fmt.Errorf("couldn't unmarshal bson bytes value as Date: %w", ErrFormat)
}

// DeepCopyInto copies the receiver and writes its value into out.
Expand Down
Loading
Loading