mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Switch to Go 1.13 error wrapping (#604)
* Replaced errors.Wrap with fmt.Errorf (#589) * Find: errors\.Wrap\(([^,]+),\s+(["`][^"`]*)(["`])\) Replace: fmt.Errorf($2: %w$3, $1) * Replaced errors.Wrapf with fmt.Errorf (#589) * Find: errors\.Wrapf\(([^,]+),\s+(["`][^"`]*)(["`])\) Replace: fmt.Errorf($2: %w$3, $1) * Find: errors\.Wrapf\(([^,]+),\s+(["`][^"`]*)(["`])(,[^)]+)\) * Replace: fmt.Errorf($2: %w$3$4, $1) * Replaced errors.Errorf with fmt.Errorf (#589) * Find: errors\.Errorf Replace: fmt.Errorf * Cleaned up remaining imports * Cleanup * Regenerate provider support matrix This was broken by #533 ... and it's now the third time this has been missed.
This commit is contained in:
committed by
Tom Limoncelli
parent
cae35a2c8f
commit
825ba2d081
@@ -8,7 +8,6 @@ import (
|
||||
|
||||
"github.com/StackExchange/dnscontrol/v2/models"
|
||||
"github.com/miekg/dns/dnsutil"
|
||||
"github.com/pkg/errors"
|
||||
yaml "gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
@@ -178,7 +177,7 @@ func oneLabel(records models.Records) yaml.MapItem {
|
||||
case "MX", "SRV":
|
||||
// Always processed as a complex{}
|
||||
default:
|
||||
panic(errors.Errorf("yamlwrite:oneLabel:len1 rtype not implemented: %s", rtype))
|
||||
panic(fmt.Errorf("yamlwrite:oneLabel:len1 rtype not implemented: %s", rtype))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,7 +198,7 @@ func oneLabel(records models.Records) yaml.MapItem {
|
||||
case "MX", "SRV":
|
||||
// Always processed as a complex{}
|
||||
default:
|
||||
panic(errors.Errorf("oneLabel:many rtype not implemented: %s", rtype))
|
||||
panic(fmt.Errorf("oneLabel:many rtype not implemented: %s", rtype))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -286,7 +285,7 @@ func oneType(records models.Records) interface{} {
|
||||
return vv
|
||||
|
||||
default:
|
||||
panic(errors.Errorf("yamlwrite:oneType rtype=%s not implemented", rtype))
|
||||
panic(fmt.Errorf("yamlwrite:oneType rtype=%s not implemented", rtype))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user