Panic on environment errors instead of log.Fatalf

This commit is contained in:
Kristóf Tóth 2019-10-09 23:10:46 +02:00
parent 3bbada4461
commit 4d035075ca
1 changed files with 1 additions and 2 deletions

View File

@ -4,7 +4,6 @@ import (
"fmt" "fmt"
"os/exec" "os/exec"
"strings" "strings"
"log"
"regexp" "regexp"
) )
@ -48,7 +47,7 @@ func executeTransShell(tj TransJob) ([]byte, error) {
func (t Translation) Translate() []string { func (t Translation) Translate() []string {
outBytes, err := t.Executor(t.job) outBytes, err := t.Executor(t.job)
if err != nil { if err != nil {
log.Fatalf("Failed to execute command 'trans': %v", err) panic(err)
} }
return uniqueSlice(parseTransOutput(string(outBytes))) return uniqueSlice(parseTransOutput(string(outBytes)))
} }