Skip to content

Commit

Permalink
Fix linter problems on master.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnavarro committed May 4, 2022
1 parent cab6927 commit 4dd1a24
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion commands/reqlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (rl *ReqLog) AddEntry(rle *ReqLogEntry) {
rl.nextID++
rl.Requests = append(rl.Requests, rle)

if rle == nil || !rle.Active {
if !rle.Active {
rl.maybeCleanup()
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/commands/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ var VersionCmd = &cmds.Command{
return nil
}

fmt.Fprint(w, fmt.Sprintf("ipfs version %s%s\n", version.Version, commitTxt))
fmt.Fprintf(w, "ipfs version %s%s\n", version.Version, commitTxt)
return nil
}),
},
Expand Down
1 change: 1 addition & 0 deletions core/coreapi/name.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func (api *NameAPI) Publish(ctx context.Context, p path.Path, opts ...caopts.Nam
}

if options.TTL != nil {
// nolint: staticcheck // non-backward compatible change
ctx = context.WithValue(ctx, "ipns-publish-ttl", *options.TTL)
}

Expand Down
1 change: 1 addition & 0 deletions core/corehttp/hostname.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ func withHostnameContext(r *http.Request, hostname string) *http.Request {
// on subdomain and dnslink gateways. While DNSlink could read value from
// Host header, subdomain gateways have more comples rules (knownSubdomainDetails)
// More: https://github.com/ipfs/dir-index-html/issues/42
// nolint: staticcheck // non-backward compatible change
ctx := context.WithValue(r.Context(), "gw-hostname", hostname)
return r.WithContext(ctx)
}
Expand Down

0 comments on commit 4dd1a24

Please sign in to comment.