mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Switch from fmt.Error* to errors.Error* (#317)
This commit is contained in:
@@ -3,10 +3,10 @@ package namedotcom
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/StackExchange/dnscontrol/providers"
|
||||
"github.com/namedotcom/go/namecom"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
const defaultAPIBase = "api.name.com"
|
||||
@@ -43,7 +43,7 @@ func newProvider(conf map[string]string) (*NameCom, error) {
|
||||
api.client.Server = conf["apiurl"]
|
||||
api.APIUser, api.APIKey, api.APIUrl = conf["apiuser"], conf["apikey"], conf["apiurl"]
|
||||
if api.APIKey == "" || api.APIUser == "" {
|
||||
return nil, fmt.Errorf("missing Name.com apikey or apiuser")
|
||||
return nil, errors.Errorf("missing Name.com apikey or apiuser")
|
||||
}
|
||||
if api.APIUrl == "" {
|
||||
api.APIUrl = defaultAPIBase
|
||||
|
Reference in New Issue
Block a user