Merge pull request #1850 from filecoin-project/chore/lint

Cleanup many lint warnings
This commit is contained in:
Łukasz Magiera
2020-05-29 18:06:06 +02:00
committed by GitHub
67 changed files with 163 additions and 818 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ func RecordValidator(ps peerstore.Peerstore) record.Validator {
}
}
const JWTSecretName = "auth-jwt-private"
const JWTSecretName = "auth-jwt-private" //nolint:gosec
type jwtPayload struct {
Allow []auth.Permission
+1 -1
View File
@@ -18,7 +18,7 @@ func AddrFilters(filters []string) func() (opts Libp2pOpts, err error) {
if err != nil {
return opts, fmt.Errorf("incorrectly formatted address filter in config: %s", s)
}
opts.Opts = append(opts.Opts, libp2p.FilterAddresses(f))
opts.Opts = append(opts.Opts, libp2p.FilterAddresses(f)) //nolint:staticcheck
}
return opts, nil
}
+5 -9
View File
@@ -72,7 +72,7 @@ func GetParams(sbc *ffiwrapper.Config) error {
return err
}
if err := paramfetch.GetParams(build.ParametersJson(), uint64(ssize)); err != nil {
if err := paramfetch.GetParams(build.ParametersJSON(), uint64(ssize)); err != nil {
return xerrors.Errorf("fetching proof parameters: %w", err)
}
@@ -167,12 +167,10 @@ func StorageMiner(mctx helpers.MetricsCtx, lc fx.Lifecycle, api lapi.FullNode, h
func HandleRetrieval(host host.Host, lc fx.Lifecycle, m retrievalmarket.RetrievalProvider) {
lc.Append(fx.Hook{
OnStart: func(context.Context) error {
m.Start()
return nil
return m.Start()
},
OnStop: func(context.Context) error {
m.Stop()
return nil
return m.Stop()
},
})
}
@@ -182,12 +180,10 @@ func HandleDeals(mctx helpers.MetricsCtx, lc fx.Lifecycle, host host.Host, h sto
lc.Append(fx.Hook{
OnStart: func(context.Context) error {
h.Start(ctx)
return nil
return h.Start(ctx)
},
OnStop: func(context.Context) error {
h.Stop()
return nil
return h.Stop()
},
})
}