From b8e09bf849c18ef2c41b5a5c83738b467c73ad29 Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Fri, 9 Dec 2016 13:15:04 -0800 Subject: [PATCH] tools: simplify boolean comparison, remove unused --- tools/etcd-dump-db/main.go | 3 --- tools/functional-tester/etcd-agent/main.go | 2 +- tools/functional-tester/etcd-tester/key_stresser.go | 1 - tools/functional-tester/etcd-tester/v2_stresser.go | 1 - 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/tools/etcd-dump-db/main.go b/tools/etcd-dump-db/main.go index f6c9a309c..b5262c90b 100644 --- a/tools/etcd-dump-db/main.go +++ b/tools/etcd-dump-db/main.go @@ -49,9 +49,6 @@ var ( var ( iterateBucketName string iterateBucketLimit uint64 - - revertCopyPath string - revertRevision int64 ) func init() { diff --git a/tools/functional-tester/etcd-agent/main.go b/tools/functional-tester/etcd-agent/main.go index 1dfc9c5ff..004b959b3 100644 --- a/tools/functional-tester/etcd-agent/main.go +++ b/tools/functional-tester/etcd-agent/main.go @@ -44,7 +44,7 @@ func main() { fmt.Println("got --use-root=true but not root user") os.Exit(1) } - if *useRoot == false { + if !*useRoot { fmt.Println("root permissions disabled, agent will not modify network") } diff --git a/tools/functional-tester/etcd-tester/key_stresser.go b/tools/functional-tester/etcd-tester/key_stresser.go index bd818b890..e049a62c9 100644 --- a/tools/functional-tester/etcd-tester/key_stresser.go +++ b/tools/functional-tester/etcd-tester/key_stresser.go @@ -42,7 +42,6 @@ type keyStresser struct { rateLimiter *rate.Limiter - mu sync.Mutex wg sync.WaitGroup cancel func() diff --git a/tools/functional-tester/etcd-tester/v2_stresser.go b/tools/functional-tester/etcd-tester/v2_stresser.go index 5ee1729ed..39fbd722c 100644 --- a/tools/functional-tester/etcd-tester/v2_stresser.go +++ b/tools/functional-tester/etcd-tester/v2_stresser.go @@ -41,7 +41,6 @@ type v2Stresser struct { wg sync.WaitGroup - mu sync.Mutex atomicModifiedKey int64 cancel func()