chore(lint): add linters musttag and gocheckcompilerdirectives

This commit is contained in:
Quentin McGaw
2023-06-07 07:42:04 +00:00
parent e7ebfc4b9a
commit e42feb933f
3 changed files with 6 additions and 3 deletions

View File

@@ -14,6 +14,7 @@ issues:
linters:
enable:
# - cyclop
- asasalint
- asciicheck
- bidichk
@@ -32,6 +33,7 @@ linters:
- exportloopref
- forcetypeassert
- gci
- gocheckcompilerdirectives
- gochecknoglobals
- gochecknoinits
- gocognit
@@ -54,6 +56,7 @@ linters:
- maintidx
- makezero
- misspell
- musttag
- nakedret
- nestif
- nilerr

View File

@@ -71,8 +71,8 @@ func (p *Provider) getRecordID(ctx context.Context, client *http.Client,
DomainRecords struct {
Record []struct {
RecordID string `json:"RecordId"`
}
}
} `json:"Record"`
} `json:"DomainRecords"`
}
err = decoder.Decode(&data)
if err != nil {

View File

@@ -12,7 +12,7 @@ import (
func extractAPIError(response *http.Response) (err error) {
decoder := json.NewDecoder(response.Body)
var apiError struct {
Message string
Message string `json:"Message"`
}
err = decoder.Decode(&apiError)
if err != nil {