From 65ada74b9884ae495a4fe7d5a706fe9715a97424 Mon Sep 17 00:00:00 2001 From: Jon Friesen Date: Tue, 9 Oct 2018 12:32:27 -0700 Subject: [PATCH] Fixes golint for test/list Fixes minor golint errors in the test/list tool. ref: #68026 --- hack/.golint_failures | 1 - test/list/main.go | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hack/.golint_failures b/hack/.golint_failures index d3fb821d71a..032952bfb29 100644 --- a/hack/.golint_failures +++ b/hack/.golint_failures @@ -792,6 +792,5 @@ test/integration/replicationcontroller test/integration/scheduler test/integration/scheduler_perf test/integration/volume -test/list test/utils test/utils/image diff --git a/test/list/main.go b/test/list/main.go index b7b25e9d687..bc4904b4ce9 100644 --- a/test/list/main.go +++ b/test/list/main.go @@ -33,10 +33,11 @@ import ( var ( 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") ) +// Test holds test locations, package names, and test names. type Test struct { Loc string Name string @@ -262,7 +263,7 @@ func main() { log.Fatalf("Error walking: %v", err) } } - if *dumpJson { + if *dumpJSON { json, err := json.Marshal(tests.tests) if err != nil { log.Fatal(err)