mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-09-11 15:44:55 +08:00
DNSMADEEASY: Fix staticcheck errors (#1316)
* DNSMADEEASY: remove unused type apiEmptyResponse * DNSMADEEASY: fix unnecessary use of fmt.Sprintf * DNSMADEEASY: fix error check in toRecordConfig
This commit is contained in:
parent
215f6ed525
commit
899a34ddd4
2 changed files with 3 additions and 6 deletions
|
@ -36,9 +36,6 @@ type apiErrorResponse struct {
|
|||
Error []string `json:"error"`
|
||||
}
|
||||
|
||||
type apiEmptyResponse struct {
|
||||
}
|
||||
|
||||
type apiRequest struct {
|
||||
method string
|
||||
endpoint string
|
||||
|
@ -98,7 +95,7 @@ func (restApi *dnsMadeEasyRestAPI) singleDomainCreate(data singleDomainRequestDa
|
|||
|
||||
req := &apiRequest{
|
||||
method: "POST",
|
||||
endpoint: fmt.Sprintf("dns/managed/"),
|
||||
endpoint: "dns/managed/",
|
||||
data: jsonData,
|
||||
}
|
||||
|
||||
|
|
|
@ -135,8 +135,8 @@ func toRecordConfig(domain string, record *recordResponseDataEntry) *models.Reco
|
|||
} else if record.Type == "SRV" {
|
||||
err = rc.SetTargetSRV(uint16(record.Priority), uint16(record.Weight), uint16(record.Port), record.Value)
|
||||
} else if record.Type == "CAA" {
|
||||
value, err := strconv.Unquote(record.Value)
|
||||
if err != nil {
|
||||
value, unquoteErr := strconv.Unquote(record.Value)
|
||||
if unquoteErr != nil {
|
||||
panic(err)
|
||||
}
|
||||
err = rc.SetTargetCAA(uint8(record.IssuerCritical), record.CaaType, value)
|
||||
|
|
Loading…
Add table
Reference in a new issue