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.
This commit is contained in:
parent
b8722ce83b
commit
3aa2cb8d3e
7 changed files with 13 additions and 78 deletions
9
main.go
9
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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue