nolint gosec

This commit is contained in:
William Banfield
2022-10-28 10:39:32 -04:00
parent af054f1626
commit e7443258fb
3 changed files with 3 additions and 4 deletions

View File

@@ -277,7 +277,7 @@ format:
lint:
@echo "--> Running linter"
@golangci-lint run
@go run github.com/golangci/golangci-lint/cmd/golangci-lint run
.PHONY: lint
DESTINATION = ./index.html.md

View File

@@ -67,8 +67,7 @@ func copyConfig(home, dir string) error {
func dumpProfile(dir, addr, profile string, debug int) error {
endpoint := fmt.Sprintf("%s/debug/pprof/%s?debug=%d", addr, profile, debug)
//nolint: gosec
resp, err := http.Get(endpoint)
resp, err := http.Get(endpoint) //nolint: gosec
if err != nil {
return fmt.Errorf("failed to query for %s profile: %w", profile, err)
}

View File

@@ -891,7 +891,7 @@ func NewNode(config *cfg.Config,
if config.RPC.PprofListenAddress != "" {
go func() {
logger.Info("Starting pprof server", "laddr", config.RPC.PprofListenAddress)
logger.Error("pprof server error", "err", http.ListenAndServe(config.RPC.PprofListenAddress, nil))
logger.Error("pprof server error", "err", http.ListenAndServe(config.RPC.PprofListenAddress, nil)) //nolint: gosec
}()
}