diff options
| author | Paul Buetow <paul@buetow.org> | 2021-09-26 16:42:47 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2021-10-02 12:26:36 +0300 |
| commit | fcaa94c7453efa0d74e330128c0f5c2cde8f11b3 (patch) | |
| tree | 1f686e5eeeb1b180cc14a3586f388f1a3492899c /cmd/dgrep | |
| parent | fe3e68afd99d8ea246be52893730f987e138ec24 (diff) | |
refactor config reader - also looks in additional search paths for config file unless NONE is specified
Diffstat (limited to 'cmd/dgrep')
| -rw-r--r-- | cmd/dgrep/main.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/dgrep/main.go b/cmd/dgrep/main.go index c6bece0..36efe4e 100644 --- a/cmd/dgrep/main.go +++ b/cmd/dgrep/main.go @@ -28,10 +28,11 @@ 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", 10, "How many connections established per CPU core concurrently") - flag.IntVar(&args.SSHPort, "port", 2222, "SSH server port") + 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") + flag.StringVar(&args.LogDir, "logDir", "", "Log dir") flag.StringVar(&args.LogLevel, "logLevel", "", "Log level") flag.StringVar(&args.PrivateKeyPathFile, "key", "", "Path to private key") flag.StringVar(&args.RegexStr, "regex", ".", "Regular expression") |
