From 3aa2cb8d3efe04eda8cf1d0d2dcb5ad8ddf21147 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 9 Mar 2018 15:17:54 +0100 Subject: refactor: Remove old error handling library MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removes the old error handling library and switches to plain fmt.Errorf calls. There are several reasons for this: * There are no useful types or handling here anyways, so output format is the only priority. * Users don't care about getting stacktraces. * My emotional wellbeing. Fin de siècle. --- templater/pass.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'templater/pass.go') diff --git a/templater/pass.go b/templater/pass.go index ecddff7402ca..53d8f2f9bc6b 100644 --- a/templater/pass.go +++ b/templater/pass.go @@ -16,27 +16,16 @@ import ( "fmt" "os" "os/exec" - - "github.com/polydawn/meep" "strings" ) -type PassError struct { - meep.TraitAutodescribing - meep.TraitCausable - Output string -} - func GetFromPass(key string) (string, error) { fmt.Fprintf(os.Stderr, "Attempting to look up %s in pass\n", key) pass := exec.Command("pass", "show", key) output, err := pass.CombinedOutput() if err != nil { - return "", meep.New( - &PassError{Output: string(output)}, - meep.Cause(err), - ) + return "", fmt.Errorf("Pass lookup failed: %s (%v)", output, err) } trimmed := strings.TrimSpace(string(output)) -- cgit 1.4.1