mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-04-05 08:54:09 -04:00
chore(lint): add linters musttag and gocheckcompilerdirectives
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user