Browse Source

cluster: remove unused variables on scan option factories

Signed-off-by: Alejandro Mery <amery@jpi.io>
pull/40/head
Alejandro Mery 8 months ago
parent
commit
f64f4e08fe
  1. 6
      pkg/cluster/cluster_scan_options.go

6
pkg/cluster/cluster_scan_options.go

@ -27,7 +27,7 @@ type ScanOptions struct {
// the DNS resolver to get PublicAddresses of nodes.
// Default is true
func ResolvePublicAddresses(resolve bool) ScanOption {
return func(m *Cluster, opt *ScanOptions) error {
return func(_ *Cluster, opt *ScanOptions) error {
opt.DontResolvePublicAddresses = !resolve
return nil
}
@ -36,7 +36,7 @@ func ResolvePublicAddresses(resolve bool) ScanOption {
// WithLookuper specifies what resolver.Lookuper to use to
// find public addresses
func WithLookuper(h resolver.Lookuper) ScanOption {
return func(m *Cluster, opt *ScanOptions) error {
return func(m *Cluster, _ *ScanOptions) error {
if h == nil {
return fs.ErrInvalid
}
@ -49,7 +49,7 @@ func WithLookuper(h resolver.Lookuper) ScanOption {
// public addresses. if nil is passed, the [net.Resolver] will be used.
// The default is using Cloudflare's 1.1.1.1.
func WithResolver(h resolver.Resolver) ScanOption {
return func(m *Cluster, opt *ScanOptions) error {
return func(m *Cluster, _ *ScanOptions) error {
if h == nil {
h = resolver.SystemResolver(true)
}

Loading…
Cancel
Save