Maintenance: fix linting errors

This commit is contained in:
Quentin McGaw
2021-01-14 02:01:22 +00:00
parent be89e798d2
commit 18b058f188
6 changed files with 4 additions and 11 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -13,7 +13,6 @@ import (
"github.com/qdm12/golibs/network"
)
//nolint:maligned
type dynV6 struct {
domain string
host string

View File

@@ -14,7 +14,6 @@ import (
"github.com/qdm12/golibs/network"
)
//nolint:maligned
type opendns struct {
domain string
host string

View File

@@ -14,7 +14,6 @@ import (
"github.com/qdm12/golibs/network"
)
//nolint:maligned
type ovh struct {
domain string
host string