about summary refs log tree commit diff
path: root/main.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 /main.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 'main.go')
-rw-r--r--main.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/main.go b/main.go
index 19dd74d0c51b..8d432ff01198 100644
--- a/main.go
+++ b/main.go
@@ -20,7 +20,6 @@ import (
 	"os"
 	"os/exec"
 
-	"github.com/polydawn/meep"
 	"github.com/tazjin/kontemplate/context"
 	"github.com/tazjin/kontemplate/templater"
 	"gopkg.in/alecthomas/kingpin.v2"
@@ -31,10 +30,6 @@ const version string = "1.3.0"
 // This variable will be initialised by the Go linker during the builder
 var gitHash string
 
-type KubeCtlError struct {
-	meep.AllTraits
-}
-
 var (
 	app = kingpin.New("kontemplate", "simple Kubernetes resource templating")
 
@@ -180,14 +175,14 @@ func runKubectlWithResources(c *context.Context, kubectlArgs *[]string, resource
 
 		stdin, err := kubectl.StdinPipe()
 		if err != nil {
-			return meep.New(&KubeCtlError{}, meep.Cause(err))
+			return fmt.Errorf("kubectl error: %v", err)
 		}
 
 		kubectl.Stdout = os.Stdout
 		kubectl.Stderr = os.Stderr
 
 		if err = kubectl.Start(); err != nil {
-			return meep.New(&KubeCtlError{}, meep.Cause(err))
+			return fmt.Errorf("kubectl error: %v", err)
 		}
 
 		for _, r := range rs.Resources {