From f12862f02cfbd8c5cba867d3018802825a5073ad Mon Sep 17 00:00:00 2001 From: Costas Drogos Date: Thu, 12 Oct 2023 23:27:40 +0200 Subject: [PATCH] Fix typo: Namserver* -> Nameserver* --- nameserver.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/nameserver.go b/nameserver.go index f6f3df9..c7b764c 100644 --- a/nameserver.go +++ b/nameserver.go @@ -46,7 +46,7 @@ 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) @@ -54,7 +54,7 @@ func (s *NameserverService) Info(request *NameserverInfoRequest) (*NamserverInfo return nil, err } - result := NamserverInfoResponse{} + result := NameserverInfoResponse{} err = mapstructure.Decode(resp, &result) if err != nil { return nil, err @@ -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, @@ -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 @@ -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"` @@ -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"` }