mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-05-15 00:50:25 +02:00
cmd/ctrld: make staticcheck happy
This commit is contained in:
committed by
Cuong Manh Le
parent
fb20d443c1
commit
b0114dfaeb
@@ -60,11 +60,11 @@ func FetchResolverConfig(uid string) (*ResolverConfig, error) {
|
||||
transport.DialContext = func(ctx context.Context, network, addr string) (net.Conn, error) {
|
||||
// We experiment hanging in TLS handshake when connecting to ControlD API
|
||||
// with ipv6. So prefer ipv4 if available.
|
||||
network = "tcp6"
|
||||
proto := "tcp6"
|
||||
if ctrldnet.SupportsIPv4() {
|
||||
network = "tcp4"
|
||||
proto = "tcp4"
|
||||
}
|
||||
return ctrldnet.Dialer.DialContext(ctx, network, addr)
|
||||
return ctrldnet.Dialer.DialContext(ctx, proto, addr)
|
||||
}
|
||||
client := http.Client{
|
||||
Timeout: 10 * time.Second,
|
||||
|
||||
@@ -100,9 +100,8 @@ type resolvedManager struct {
|
||||
logf logger.Logf
|
||||
ifidx int
|
||||
|
||||
configCR chan changeRequest // tracks OSConfigs changes and error responses
|
||||
revertCh chan struct{}
|
||||
newManager func(conn *dbus.Conn) dbus.BusObject
|
||||
configCR chan changeRequest // tracks OSConfigs changes and error responses
|
||||
revertCh chan struct{}
|
||||
}
|
||||
|
||||
var _ OSConfigurator = (*resolvedManager)(nil)
|
||||
|
||||
Reference in New Issue
Block a user