Skip to content

Commit

Permalink
style: fix lint errors using latest golanci (#1403)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanchristo authored Aug 24, 2022
1 parent 9c1314e commit f09ed5b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ linters:
disable-all: true
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- errcheck
Expand Down
3 changes: 1 addition & 2 deletions types/timestamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"time"

gogotypes "github.com/gogo/protobuf/types"
"github.com/pkg/errors"
"google.golang.org/protobuf/types/known/durationpb"
"google.golang.org/protobuf/types/known/timestamppb"
)
Expand Down Expand Up @@ -47,7 +46,7 @@ func GogoToProtobufDuration(d *gogotypes.Duration) *durationpb.Duration {
func ParseDate(field string, date string) (time.Time, error) {
t, err := time.Parse("2006-01-02", date)
if err != nil {
return t, errors.New(fmt.Sprintf("%s must have format yyyy-mm-dd, but received %v", field, date))
return t, fmt.Errorf("%s must have format yyyy-mm-dd, but received %v", field, date)
}
return t, nil
}
1 change: 1 addition & 0 deletions x/data/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func (s serverImpl) QueryServer() data.QueryServer {
return s
}

//nolint:revive
func NewServer(storeKey storetypes.StoreKey, ak data.AccountKeeper, bk data.BankKeeper) serverImpl {
hasher, err := hasher.NewHasher()
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions x/ecocredit/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type serverImpl struct {
basketStore basketapi.StateStore
}

//nolint:revive
func NewServer(storeKey storetypes.StoreKey, paramSpace paramtypes.Subspace,
accountKeeper ecocredit.AccountKeeper, bankKeeper ecocredit.BankKeeper, authority sdk.AccAddress) serverImpl {
s := serverImpl{
Expand Down

0 comments on commit f09ed5b

Please sign in to comment.