Update staticcheck version and fix all warnings (#1381)

This commit is contained in:
Ta-Ching Chen
2019-11-05 18:09:12 +08:00
committed by GitHub
parent 93d4b88d84
commit b9a5588ca9
43 changed files with 122 additions and 219 deletions
-15
View File
@@ -25,10 +25,8 @@ package executor
import (
"context"
"fmt"
"io/ioutil"
"log"
"math/rand"
"net/http"
"os"
"testing"
"time"
@@ -99,19 +97,6 @@ func createSvc(kubeClient *kubernetes.Clientset, ns string, name string, targetP
return svc
}
func httpGet(url string) string {
resp, err := http.Get(url)
if err != nil {
log.Panicf("HTTP Get failed: URL %v: %v", url, err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Panicf("HTTP Get failed to read body: URL %v: %v", url, err)
}
return string(body)
}
func TestExecutor(t *testing.T) {
// run in a random namespace so we can have concurrent tests
// on a given cluster