We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07bd3f1 commit 51b7263Copy full SHA for 51b7263
main.go
@@ -37,15 +37,23 @@ func main() {
37
help := pflag.BoolP("help", "h", false, "Print usage")
38
exitErr := pflag.BoolP("exit-with-error", "e", false, "Exit with error code if docker.sock found")
39
verbose := pflag.IntP("verbose", "v", 2, "Logging level")
40
+ printVersion := pflag.Bool("version", false, "Print plugin version and exit")
41
42
pflag.Parse()
43
44
+ var version = "development"
45
+
46
flag.Set("v", strconv.Itoa(*verbose))
47
if *help {
48
pflag.PrintDefaults()
49
os.Exit(0)
50
}
51
52
+ if *printVersion {
53
+ fmt.Println(version)
54
+ os.Exit(0)
55
+ }
56
57
// initialize tabwriter
58
w := new(tabwriter.Writer)
59
0 commit comments