Unverified Commit 86e2d2bf authored by k8s-ci-robot's avatar k8s-ci-robot Committed by GitHub

Merge pull request #69587 from jonfriesen/fix_golint_tests

Fixes golint for test/list
parents 4cbeddd7 65ada74b
...@@ -777,6 +777,5 @@ test/integration/replicationcontroller ...@@ -777,6 +777,5 @@ test/integration/replicationcontroller
test/integration/scheduler test/integration/scheduler
test/integration/scheduler_perf test/integration/scheduler_perf
test/integration/volume test/integration/volume
test/list
test/utils test/utils
test/utils/image test/utils/image
...@@ -33,10 +33,11 @@ import ( ...@@ -33,10 +33,11 @@ import (
var ( var (
dumpTree = flag.Bool("dump", false, "print AST") dumpTree = flag.Bool("dump", false, "print AST")
dumpJson = flag.Bool("json", false, "output test list as JSON") dumpJSON = flag.Bool("json", false, "output test list as JSON")
warn = flag.Bool("warn", false, "print warnings") warn = flag.Bool("warn", false, "print warnings")
) )
// Test holds test locations, package names, and test names.
type Test struct { type Test struct {
Loc string Loc string
Name string Name string
...@@ -262,7 +263,7 @@ func main() { ...@@ -262,7 +263,7 @@ func main() {
log.Fatalf("Error walking: %v", err) log.Fatalf("Error walking: %v", err)
} }
} }
if *dumpJson { if *dumpJSON {
json, err := json.Marshal(tests.tests) json, err := json.Marshal(tests.tests)
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment