about summary refs log tree commit diff
path: root/templater/pass.go
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2018-03-09T14·17+0100
committerVincent Ambo <github@tazj.in>2018-03-09T14·23+0100
commit3aa2cb8d3efe04eda8cf1d0d2dcb5ad8ddf21147 (patch)
tree45187c7d315d744a820706579222f66626bb0a80 /templater/pass.go
parentb8722ce83bce727d88a61cecff3343d3046e75f7 (diff)
refactor: Remove old error handling library
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.
Diffstat (limited to 'templater/pass.go')
-rw-r--r--templater/pass.go13
1 files changed, 1 insertions, 12 deletions
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))