mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-04-05 00:43:53 -04:00
Maintenance: fix linting errors
This commit is contained in:
@@ -34,14 +34,6 @@ issues:
|
||||
linters:
|
||||
- maligned
|
||||
- dupl
|
||||
- path: internal/settings/dreamhost\.go
|
||||
text: "mnd: Magic number: 0x40, in <operation> detected"
|
||||
linters:
|
||||
- gomnd
|
||||
- path: internal/settings/dreamhost\.go
|
||||
text: "mnd: Magic number: 0x80, in <operation> detected"
|
||||
linters:
|
||||
- gomnd
|
||||
|
||||
linters:
|
||||
disable-all: true
|
||||
|
||||
@@ -83,6 +83,8 @@ func extractAllSettings(jsonBytes []byte) (allSettings []settings.Settings, warn
|
||||
return allSettings, warnings, nil
|
||||
}
|
||||
|
||||
// TODO remove gocyclo.
|
||||
//nolint:gocyclo
|
||||
func makeSettingsFromObject(common commonSettings, rawSettings json.RawMessage, matcher regex.Matcher) (
|
||||
settingsSlice []settings.Settings, warnings []string, err error) {
|
||||
provider := models.Provider(common.Provider)
|
||||
|
||||
@@ -142,7 +142,9 @@ type (
|
||||
func makeDreamhostDefaultValues(key string) (values url.Values) {
|
||||
uuid := make([]byte, 16)
|
||||
_, _ = io.ReadFull(rand.Reader, uuid)
|
||||
//nolint:gomnd
|
||||
uuid[6] = (uuid[6] & 0x0f) | 0x40 // Version 4
|
||||
//nolint:gomnd
|
||||
uuid[8] = (uuid[8] & 0x3f) | 0x80 // Variant is 10
|
||||
values = url.Values{}
|
||||
values.Set("key", key)
|
||||
|
||||
@@ -13,7 +13,6 @@ import (
|
||||
"github.com/qdm12/golibs/network"
|
||||
)
|
||||
|
||||
//nolint:maligned
|
||||
type dynV6 struct {
|
||||
domain string
|
||||
host string
|
||||
|
||||
@@ -14,7 +14,6 @@ import (
|
||||
"github.com/qdm12/golibs/network"
|
||||
)
|
||||
|
||||
//nolint:maligned
|
||||
type opendns struct {
|
||||
domain string
|
||||
host string
|
||||
|
||||
@@ -14,7 +14,6 @@ import (
|
||||
"github.com/qdm12/golibs/network"
|
||||
)
|
||||
|
||||
//nolint:maligned
|
||||
type ovh struct {
|
||||
domain string
|
||||
host string
|
||||
|
||||
Reference in New Issue
Block a user