From 4d035075ca3352d035516cddf0d86202c58bf49c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Wed, 9 Oct 2019 23:10:46 +0200 Subject: [PATCH] Panic on environment errors instead of log.Fatalf --- trans/trans.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/trans/trans.go b/trans/trans.go index ceb8e49..10e2ffe 100644 --- a/trans/trans.go +++ b/trans/trans.go @@ -4,7 +4,6 @@ import ( "fmt" "os/exec" "strings" - "log" "regexp" ) @@ -48,7 +47,7 @@ func executeTransShell(tj TransJob) ([]byte, error) { func (t Translation) Translate() []string { outBytes, err := t.Executor(t.job) if err != nil { - log.Fatalf("Failed to execute command 'trans': %v", err) + panic(err) } return uniqueSlice(parseTransOutput(string(outBytes))) }