Skip to content

Commit

Permalink
Fix typo: Namserver* -> Nameserver*
Browse files Browse the repository at this point in the history
  • Loading branch information
costasd committed Oct 12, 2023
1 parent dfd35b6 commit f12862f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions nameserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ func (s *NameserverService) Check(domain string, nameservers []string) (*Nameser
}

// Info gets information.
func (s *NameserverService) Info(request *NameserverInfoRequest) (*NamserverInfoResponse, error) {
func (s *NameserverService) Info(request *NameserverInfoRequest) (*NameserverInfoResponse, error) {
req := s.client.NewRequest(methodNameserverInfo, structs.Map(request))

resp, err := s.client.Do(req)
if err != nil {
return nil, err
}

result := NamserverInfoResponse{}
result := NameserverInfoResponse{}
err = mapstructure.Decode(resp, &result)
if err != nil {
return nil, err
Expand All @@ -64,7 +64,7 @@ func (s *NameserverService) Info(request *NameserverInfoRequest) (*NamserverInfo
}

// List lists nameservers for a domain.
func (s *NameserverService) List(domain string) (*NamserverListResponse, error) {
func (s *NameserverService) List(domain string) (*NameserverListResponse, error) {
requestMap := map[string]interface{}{
"domain": "*",
"wide": 2,
Expand All @@ -81,7 +81,7 @@ func (s *NameserverService) List(domain string) (*NamserverListResponse, error)
return nil, err
}

result := NamserverListResponse{}
result := NameserverListResponse{}
err = mapstructure.Decode(resp, &result)
if err != nil {
return nil, err
Expand Down Expand Up @@ -234,8 +234,8 @@ type NameserverInfoRequest struct {
Priority int `structs:"prio,omitempty"`
}

// NamserverInfoResponse API model.
type NamserverInfoResponse struct {
// NameserverInfoResponse API model.
type NameserverInfoResponse struct {
RoID int `mapstructure:"roId"`
Domain string `mapstructure:"domain"`
Type string `mapstructure:"type"`
Expand Down Expand Up @@ -268,8 +268,8 @@ type NameserverRecord struct {
URLRedirectFavIcon string `mapstructure:"urlRedirectFavIcon"`
}

// NamserverListResponse API model.
type NamserverListResponse struct {
// NameserverListResponse API model.
type NameserverListResponse struct {
Count int `mapstructure:"count"`
Domains []NameserverDomain `mapstructure:"domains"`
}
Expand Down

0 comments on commit f12862f

Please sign in to comment.