mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
MAINT: Make staticcheck more strict and fix new warnings (#1408)
* Make staticcheck more strict and fix new warnings
This commit is contained in:
@@ -5,18 +5,18 @@ import (
|
||||
)
|
||||
|
||||
// ListZones returns all the zones in an account
|
||||
func (c *namedotcomProvider) ListZones() ([]string, error) {
|
||||
func (n *namedotcomProvider) ListZones() ([]string, error) {
|
||||
var names []string
|
||||
var page int32
|
||||
|
||||
for {
|
||||
n, err := c.client.ListDomains(&namecom.ListDomainsRequest{Page: page})
|
||||
response, err := n.client.ListDomains(&namecom.ListDomainsRequest{Page: page})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
page = n.NextPage
|
||||
page = response.NextPage
|
||||
|
||||
for _, j := range n.Domains {
|
||||
for _, j := range response.Domains {
|
||||
names = append(names, j.DomainName)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user