From 609b6002557805c0810dffddce87e1e685b464a9 Mon Sep 17 00:00:00 2001 From: Uwe Dauernheim Date: Fri, 6 May 2022 14:38:45 +0200 Subject: [PATCH] Fix linter warnings --- http_test.go | 3 ++- main.go | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/http_test.go b/http_test.go index d4aeb61..e744bee 100644 --- a/http_test.go +++ b/http_test.go @@ -22,7 +22,8 @@ func TestTLSSkipVerify(t *testing.T) { shutdownServer := setupHttpsServer(t) defer shutdownServer() - ctx, _ := context.WithTimeout(context.Background(), 10*time.Second) + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() resources, _ := parseResources([]string{ "https://localhost:55372", diff --git a/main.go b/main.go index 67788ee..8b45174 100644 --- a/main.go +++ b/main.go @@ -118,11 +118,6 @@ func indexOf(l []string, s string) int { return -1 } -func stdinFromPipe() bool { - stat, _ := os.Stdin.Stat() - return (stat.Mode() & os.ModeNamedPipe) != 0 -} - func readFromFile(filepath string) ([]string, error) { f := os.Stdin if filepath != "-" {