diff options
| author | Paul Buetow <pbuetow@mimecast.com> | 2020-09-04 14:42:38 +0300 |
|---|---|---|
| committer | Paul Buetow <pbuetow@mimecast.com> | 2020-09-04 14:42:38 +0300 |
| commit | 4a200606e6186b8457b336d07a7eef01f8929b9e (patch) | |
| tree | eccadaab2b051496a76e2a642766d77e6634b456 /cmd/dgrep | |
| parent | 26ba76807853ec7d98b6190a72f4031f3cd80bed (diff) | |
server side support for new regex package
Diffstat (limited to 'cmd/dgrep')
| -rw-r--r-- | cmd/dgrep/main.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cmd/dgrep/main.go b/cmd/dgrep/main.go index faffe76..c08c479 100644 --- a/cmd/dgrep/main.go +++ b/cmd/dgrep/main.go @@ -22,7 +22,8 @@ func main() { var displayVersion bool var files string var noColor bool - var regex string + var regexStr string + var regexInvert bool var serversStr string var quietEnable bool var sshPort int @@ -41,7 +42,9 @@ func main() { flag.StringVar(&cfgFile, "cfg", "", "Config file path") flag.StringVar(&discovery, "discovery", "", "Server discovery method") flag.StringVar(&files, "files", "", "File(s) to read") - flag.StringVar(®ex, "regex", ".", "Regular expression") + flag.StringVar(®exStr, "regex", ".", "Regular expression") + flag.StringVar(®exStr, "grep", ".", "Alias for -regex") + flag.BoolVar(®exInvert, "invert", false, "Invert regex") flag.StringVar(&serversStr, "servers", "", "Remote servers to connect") flag.StringVar(&userName, "user", userName, "Your system user name") flag.StringVar(&privateKeyPathFile, "key", "", "Path to private key") @@ -65,7 +68,8 @@ func main() { UserName: userName, What: files, TrustAllHosts: trustAllHosts, - Regex: regex, + RegexStr: regexStr, + RegexInvert: regexInvert, PrivateKeyPathFile: privateKeyPathFile, } |
