From b10c35bba19205faf7f9c7d83f1acea5e5eb1f6d Mon Sep 17 00:00:00 2001 From: "Andrew E. Bruno" Date: Sat, 19 Mar 2016 16:14:23 -0400 Subject: [PATCH] golint fixes. - dynRequest should be private to dyn package - Fix JobID name --- providers/dns/dyn/dyn.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/providers/dns/dyn/dyn.go b/providers/dns/dyn/dyn.go index a16e68aa..a88a6e7a 100644 --- a/providers/dns/dyn/dyn.go +++ b/providers/dns/dyn/dyn.go @@ -14,7 +14,7 @@ import ( var dynBaseURL = "https://api.dynect.net/REST" -type DynResponse struct { +type dynResponse struct { // One of 'success', 'failure', or 'incomplete' Status string `json:"status"` @@ -22,7 +22,7 @@ type DynResponse struct { Data json.RawMessage `json:"data"` // The ID of the job that was created in response to a request. - JobId int `json:"job_id"` + JobID int `json:"job_id"` // A list of zero or more messages Messages json.RawMessage `json:"msgs"` @@ -48,7 +48,7 @@ func NewDNSProvider(customerName, userName, password string) (*DNSProvider, erro }, nil } -func (d *DNSProvider) sendRequest(method, resource string, payload interface{}) (*DynResponse, error) { +func (d *DNSProvider) sendRequest(method, resource string, payload interface{}) (*dynResponse, error) { url := fmt.Sprintf("%s/%s", dynBaseURL, resource) body, err := json.Marshal(payload) @@ -79,7 +79,7 @@ func (d *DNSProvider) sendRequest(method, resource string, payload interface{}) return nil, fmt.Errorf("Dyn API request returned HTTP 307. This is currently unsupported") } - var dynRes DynResponse + var dynRes dynResponse err = json.NewDecoder(resp.Body).Decode(&dynRes) if err != nil { return nil, err