mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Make staticcheck more strict and fix new warnings
This commit is contained in:
@@ -52,13 +52,13 @@ func initProvider(config map[string]string, providermeta json.RawMessage) (provi
|
||||
if api.directory == "" {
|
||||
api.directory = "config"
|
||||
}
|
||||
if len(providermeta) != 0 {
|
||||
err := json.Unmarshal(providermeta, api)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
//api.nameservers = models.StringsToNameservers(api.DefaultNS)
|
||||
// Commented out because at this time api has no exported fields.
|
||||
// if len(providermeta) != 0 {
|
||||
// err := json.Unmarshal(providermeta, api)
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// }
|
||||
return api, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user