diff options
| author | Paul Buetow <paul@buetow.org> | 2021-10-09 21:10:29 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2021-10-10 13:36:41 +0300 |
| commit | 97747ea0f3178f7f5890512d483fdccaa82846b0 (patch) | |
| tree | 9ff1335ca26afc90e55fd6de416457e252d75a35 /cmd | |
| parent | 7a7169791a64190e1002e38bc9c04ad0d5c1ce1f (diff) | |
vetting and linting and some code restyling
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/dcat/main.go | 3 | ||||
| -rw-r--r-- | cmd/dgrep/main.go | 4 | ||||
| -rw-r--r-- | cmd/dmap/main.go | 5 | ||||
| -rw-r--r-- | cmd/dserver/main.go | 3 | ||||
| -rw-r--r-- | cmd/dtail/main.go | 6 | ||||
| -rw-r--r-- | cmd/dtailhealthcheck/main.go | 1 |
6 files changed, 12 insertions, 10 deletions
diff --git a/cmd/dcat/main.go b/cmd/dcat/main.go index 662a50d..87ece9d 100644 --- a/cmd/dcat/main.go +++ b/cmd/dcat/main.go @@ -33,7 +33,8 @@ func main() { flag.BoolVar(&args.Spartan, "spartan", false, "Spartan output mode") flag.BoolVar(&args.TrustAllHosts, "trustAllHosts", false, "Trust all unknown host keys") flag.BoolVar(&displayVersion, "version", false, "Display version") - flag.IntVar(&args.ConnectionsPerCPU, "cpc", config.DefaultConnectionsPerCPU, "How many connections established per CPU core concurrently") + flag.IntVar(&args.ConnectionsPerCPU, "cpc", config.DefaultConnectionsPerCPU, + "How many connections established per CPU core concurrently") flag.IntVar(&args.SSHPort, "port", config.DefaultSSHPort, "SSH server port") flag.IntVar(&pprof, "pprof", -1, "Start PProf server this port") flag.StringVar(&args.ConfigFile, "cfg", "", "Config file path") diff --git a/cmd/dgrep/main.go b/cmd/dgrep/main.go index 529331d..576e22b 100644 --- a/cmd/dgrep/main.go +++ b/cmd/dgrep/main.go @@ -20,7 +20,6 @@ func main() { var args config.Args var displayVersion bool var grep string - userName := user.Name() flag.BoolVar(&args.NoColor, "noColor", false, "Disable ANSII terminal colors") @@ -29,7 +28,8 @@ func main() { flag.BoolVar(&args.Spartan, "spartan", false, "Spartan output mode") flag.BoolVar(&args.TrustAllHosts, "trustAllHosts", false, "Trust all unknown host keys") flag.BoolVar(&displayVersion, "version", false, "Display version") - flag.IntVar(&args.ConnectionsPerCPU, "cpc", config.DefaultConnectionsPerCPU, "How many connections established per CPU core concurrently") + flag.IntVar(&args.ConnectionsPerCPU, "cpc", config.DefaultConnectionsPerCPU, + "How many connections established per CPU core concurrently") flag.IntVar(&args.SSHPort, "port", config.DefaultSSHPort, "SSH server port") flag.StringVar(&args.ConfigFile, "cfg", "", "Config file path") flag.StringVar(&args.Discovery, "discovery", "", "Server discovery method") diff --git a/cmd/dmap/main.go b/cmd/dmap/main.go index acc1dc6..1f44076 100644 --- a/cmd/dmap/main.go +++ b/cmd/dmap/main.go @@ -19,11 +19,9 @@ import ( // The evil begins here. func main() { var displayVersion bool - args := config.Args{ Mode: omode.MapClient, } - userName := user.Name() flag.BoolVar(&args.NoColor, "noColor", false, "Disable ANSII terminal colors") @@ -31,7 +29,8 @@ func main() { flag.BoolVar(&args.Spartan, "spartan", false, "Spartan output mode") flag.BoolVar(&args.TrustAllHosts, "trustAllHosts", false, "Trust all unknown host keys") flag.BoolVar(&displayVersion, "version", false, "Display version") - flag.IntVar(&args.ConnectionsPerCPU, "cpc", config.DefaultConnectionsPerCPU, "How many connections established per CPU core concurrently") + flag.IntVar(&args.ConnectionsPerCPU, "cpc", config.DefaultConnectionsPerCPU, + "How many connections established per CPU core concurrently") flag.IntVar(&args.SSHPort, "port", config.DefaultSSHPort, "SSH server port") flag.IntVar(&args.Timeout, "timeout", 0, "Max time dtail server will collect data until disconnection") flag.StringVar(&args.ConfigFile, "cfg", "", "Config file path") diff --git a/cmd/dserver/main.go b/cmd/dserver/main.go index b4fc873..cf726cf 100644 --- a/cmd/dserver/main.go +++ b/cmd/dserver/main.go @@ -32,7 +32,8 @@ func main() { user.NoRootCheck() flag.BoolVar(&color, "color", false, "Enable ANSII terminal colors") - flag.BoolVar(&config.ServerRelaxedAuthEnable, "relaxedAuth", false, "Enable relaxced SSH auth mode (don't use in production!)") + flag.BoolVar(&config.ServerRelaxedAuthEnable, "relaxedAuth", false, + "Enable relaxced SSH auth mode (don't use in production!)") flag.BoolVar(&displayVersion, "version", false, "Display version") flag.IntVar(&args.SSHPort, "port", config.DefaultSSHPort, "SSH server port") flag.IntVar(&pprof, "pprof", -1, "Start PProf server this port") diff --git a/cmd/dtail/main.go b/cmd/dtail/main.go index adfeaa5..2863370 100644 --- a/cmd/dtail/main.go +++ b/cmd/dtail/main.go @@ -44,7 +44,8 @@ func main() { flag.BoolVar(&displayColorTable, "colorTable", false, "Show color table") flag.BoolVar(&displayWideColorTable, "wideColorTable", false, "Show a large color table") flag.BoolVar(&displayVersion, "version", false, "Display version") - flag.IntVar(&args.ConnectionsPerCPU, "cpc", config.DefaultConnectionsPerCPU, "How many connections established per CPU core concurrently") + flag.IntVar(&args.ConnectionsPerCPU, "cpc", config.DefaultConnectionsPerCPU, + "How many connections established per CPU core concurrently") flag.IntVar(&args.SSHPort, "port", config.DefaultSSHPort, "SSH server port") flag.IntVar(&args.Timeout, "timeout", 0, "Max time dtail server will collect data until disconnection") flag.IntVar(&pprof, "pprof", -1, "Start PProf server this port") @@ -93,7 +94,8 @@ func main() { dlog.Start(ctx, &wg, source.Client) if checkHealth { - fmt.Println("WARN: DTail health check has moved to separate binary dtailhealtcheck - please adjust the monitoring scripts!") + fmt.Println("WARN: DTail health check has moved to separate binary dtailhealtcheck" + + " - please adjust the monitoring scripts!") cancel() os.Exit(1) } diff --git a/cmd/dtailhealthcheck/main.go b/cmd/dtailhealthcheck/main.go index 0f37f8a..b0ba4cd 100644 --- a/cmd/dtailhealthcheck/main.go +++ b/cmd/dtailhealthcheck/main.go @@ -35,7 +35,6 @@ func main() { defer cancel() var wg sync.WaitGroup wg.Add(1) - dlog.Start(ctx, &wg, source.HealthCheck) if pprof > -1 { |
