diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-08 09:36:24 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-08 09:36:24 +0200 |
| commit | d5238b199fe592efd6ed9a2c54e4fc475221ff71 (patch) | |
| tree | d65ce1e4e5cddaa44c41f50f7454759f4172563f /cmd/dgrep/main.go | |
| parent | 77b41ce17090008470c261d1f185da43f76ec0c2 (diff) | |
task: replace panic-based CLI/runtime exits (task 380)
Diffstat (limited to 'cmd/dgrep/main.go')
| -rw-r--r-- | cmd/dgrep/main.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/dgrep/main.go b/cmd/dgrep/main.go index 0e4eb29..121b576 100644 --- a/cmd/dgrep/main.go +++ b/cmd/dgrep/main.go @@ -2,6 +2,7 @@ package main import ( "flag" + "fmt" "os" "github.com/mimecast/dtail/internal/cli" @@ -73,7 +74,8 @@ func main() { client, err := clients.NewGrepClient(args) if err != nil { runtime.Stop() - panic(err) + fmt.Fprintf(os.Stderr, "unable to create dgrep client: %v\n", err) + os.Exit(1) } status := client.Start(runtime.Context(), signal.InterruptCh(runtime.Context())) |
