From 1be64f0d11396c620f762e64af7d94daf5d72a8c Mon Sep 17 00:00:00 2001 From: Bradley Cicenas Date: Wed, 29 Nov 2017 03:03:46 +0000 Subject: [PATCH] define flag vars in block --- main.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/main.go b/main.go index 0b93aea..86a8543 100644 --- a/main.go +++ b/main.go @@ -33,14 +33,16 @@ func main() { defer panicExit() // parse command line arguments - var versionFlag = flag.Bool("v", false, "output version information and exit") - var helpFlag = flag.Bool("h", false, "display this help dialog") - var filterFlag = flag.String("f", "", "filter containers") - var activeOnlyFlag = flag.Bool("a", false, "show active containers only") - var sortFieldFlag = flag.String("s", "", "select container sort field") - var reverseSortFlag = flag.Bool("r", false, "reverse container sort order") - var invertFlag = flag.Bool("i", false, "invert default colors") - var connectorFlag = flag.String("connector", "docker", "container connector to use") + var ( + versionFlag = flag.Bool("v", false, "output version information and exit") + helpFlag = flag.Bool("h", false, "display this help dialog") + filterFlag = flag.String("f", "", "filter containers") + activeOnlyFlag = flag.Bool("a", false, "show active containers only") + sortFieldFlag = flag.String("s", "", "select container sort field") + reverseSortFlag = flag.Bool("r", false, "reverse container sort order") + invertFlag = flag.Bool("i", false, "invert default colors") + connectorFlag = flag.String("connector", "docker", "container connector to use") + ) flag.Parse() if *versionFlag {