1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

remove unused parameters

This commit is contained in:
Tom Limoncelli
2024-03-04 20:35:10 -05:00
parent ce12d892df
commit 51d1c57a8d
9 changed files with 14 additions and 11 deletions

View File

@@ -28,7 +28,8 @@ func (c *certManager) getOrCreateAccount() (*Account, error) {
return account, err return account, err
} }
func (c *certManager) createAccount(email string) (*Account, error) { // func (c *certManager) createAccount(email string) (*Account, error) {
func (c *certManager) createAccount(_ string) (*Account, error) {
privateKey, err := ecdsa.GenerateKey(elliptic.P384(), rand.Reader) privateKey, err := ecdsa.GenerateKey(elliptic.P384(), rand.Reader)
if err != nil { if err != nil {
return nil, err return nil, err

View File

@@ -31,7 +31,7 @@ func newAzureDNSDsp(conf map[string]string, metadata json.RawMessage) (providers
return newAzureDNS(conf, metadata) return newAzureDNS(conf, metadata)
} }
func newAzureDNS(m map[string]string, metadata json.RawMessage) (*azurednsProvider, error) { func newAzureDNS(m map[string]string, _ json.RawMessage) (*azurednsProvider, error) {
subID, rg := m["SubscriptionID"], m["ResourceGroup"] subID, rg := m["SubscriptionID"], m["ResourceGroup"]
clientID, clientSecret, tenantID := m["ClientID"], m["ClientSecret"], m["TenantID"] clientID, clientSecret, tenantID := m["ClientID"], m["ClientSecret"], m["TenantID"]
credential, authErr := aauth.NewClientSecretCredential(tenantID, clientID, clientSecret, nil) credential, authErr := aauth.NewClientSecretCredential(tenantID, clientID, clientSecret, nil)

View File

@@ -3,6 +3,7 @@ package bunnydns
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/StackExchange/dnscontrol/v4/models" "github.com/StackExchange/dnscontrol/v4/models"
"github.com/StackExchange/dnscontrol/v4/providers" "github.com/StackExchange/dnscontrol/v4/providers"
) )

View File

@@ -82,7 +82,7 @@ func newReg(conf map[string]string) (providers.Registrar, error) {
} }
// newHelper generates a handle. // newHelper generates a handle.
func newHelper(m map[string]string, metadata json.RawMessage) (*gandiv5Provider, error) { func newHelper(m map[string]string, _ json.RawMessage) (*gandiv5Provider, error) {
api := &gandiv5Provider{} api := &gandiv5Provider{}
api.apikey = m["apikey"] api.apikey = m["apikey"]
if api.apikey == "" { if api.apikey == "" {

View File

@@ -78,7 +78,7 @@ func newReg(conf map[string]string) (providers.Registrar, error) {
} }
// newHelper generates a handle. // newHelper generates a handle.
func newHelper(m map[string]string, metadata json.RawMessage) (*APIClient, error) { func newHelper(m map[string]string, _ json.RawMessage) (*APIClient, error) {
if m["username"] == "" { if m["username"] == "" {
return nil, fmt.Errorf("missing Loopia API username") return nil, fmt.Errorf("missing Loopia API username")
} }

View File

@@ -31,7 +31,7 @@ var features = providers.DocumentationNotes{
providers.DocOfficiallySupported: providers.Cannot(), providers.DocOfficiallySupported: providers.Cannot(),
} }
func newOVH(m map[string]string, metadata json.RawMessage) (*ovhProvider, error) { func newOVH(m map[string]string, _ json.RawMessage) (*ovhProvider, error) {
appKey, appSecretKey, consumerKey := m["app-key"], m["app-secret-key"], m["consumer-key"] appKey, appSecretKey, consumerKey := m["app-key"], m["app-secret-key"], m["consumer-key"]
c, err := ovh.NewClient(getOVHEndpoint(m), appKey, appSecretKey, consumerKey) c, err := ovh.NewClient(getOVHEndpoint(m), appKey, appSecretKey, consumerKey)

View File

@@ -34,7 +34,7 @@ func newDsp(conf map[string]string, metadata json.RawMessage) (providers.DNSServ
} }
// newPorkbun creates the provider. // newPorkbun creates the provider.
func newPorkbun(m map[string]string, metadata json.RawMessage) (*porkbunProvider, error) { func newPorkbun(m map[string]string, _ json.RawMessage) (*porkbunProvider, error) {
c := &porkbunProvider{} c := &porkbunProvider{}
c.apiKey, c.secretKey = m["api_key"], m["secret_key"] c.apiKey, c.secretKey = m["api_key"], m["secret_key"]

View File

@@ -3,14 +3,15 @@ package realtimeregister
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"sort"
"strconv"
"strings"
"github.com/StackExchange/dnscontrol/v4/models" "github.com/StackExchange/dnscontrol/v4/models"
"github.com/StackExchange/dnscontrol/v4/pkg/diff2" "github.com/StackExchange/dnscontrol/v4/pkg/diff2"
"github.com/StackExchange/dnscontrol/v4/providers" "github.com/StackExchange/dnscontrol/v4/providers"
"github.com/miekg/dns/dnsutil" "github.com/miekg/dns/dnsutil"
"golang.org/x/exp/slices" "golang.org/x/exp/slices"
"sort"
"strconv"
"strings"
) )
/* /*
@@ -54,7 +55,7 @@ func init() {
providers.RegisterRegistrarType("REALTIMEREGISTER", newRtrReg) providers.RegisterRegistrarType("REALTIMEREGISTER", newRtrReg)
} }
func newRtr(config map[string]string, metadata json.RawMessage) (*realtimeregisterAPI, error) { func newRtr(config map[string]string, _ json.RawMessage) (*realtimeregisterAPI, error) {
apikey := config["apikey"] apikey := config["apikey"]
sandbox := config["sandbox"] == "1" sandbox := config["sandbox"] == "1"

View File

@@ -43,7 +43,7 @@ func newRoute53Dsp(conf map[string]string, metadata json.RawMessage) (providers.
return newRoute53(conf, metadata) return newRoute53(conf, metadata)
} }
func newRoute53(m map[string]string, metadata json.RawMessage) (*route53Provider, error) { func newRoute53(m map[string]string, _ json.RawMessage) (*route53Provider, error) {
optFns := []func(*config.LoadOptions) error{ optFns := []func(*config.LoadOptions) error{
// Route53 uses a global endpoint and route53domains // Route53 uses a global endpoint and route53domains
// currently only has a single regional endpoint in us-east-1 // currently only has a single regional endpoint in us-east-1