diff options
author | Vincent Ambo <tazjin@gmail.com> | 2018-03-09T14·17+0100 |
---|---|---|
committer | Vincent Ambo <github@tazj.in> | 2018-03-09T14·23+0100 |
commit | 3aa2cb8d3efe04eda8cf1d0d2dcb5ad8ddf21147 (patch) | |
tree | 45187c7d315d744a820706579222f66626bb0a80 /templater/dns.go | |
parent | b8722ce83bce727d88a61cecff3343d3046e75f7 (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/dns.go')
-rw-r--r-- | templater/dns.go | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/templater/dns.go b/templater/dns.go index 096ceb1dfd52..e6b21068041a 100644 --- a/templater/dns.go +++ b/templater/dns.go @@ -14,26 +14,16 @@ package templater import ( "fmt" - "github.com/polydawn/meep" "net" "os" ) -type DNSError struct { - meep.TraitAutodescribing - meep.TraitCausable - Output string -} - func GetIPsFromDNS(host string) ([]interface{}, error) { fmt.Fprintf(os.Stderr, "Attempting to look up IP for %s in DNS\n", host) ips, err := net.LookupIP(host) if err != nil { - return nil, meep.New( - &DNSError{Output: "IP address lookup failed"}, - meep.Cause(err), - ) + return nil, fmt.Errorf("IP address lookup failed: %v", err) } var result []interface{} = make([]interface{}, len(ips)) |