mirror of
https://github.com/k3s-io/k3s.git
synced 2026-02-03 20:39:49 -05:00
lint: superfluous-else
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
parent
e416f10e3a
commit
83feb3c31d
2 changed files with 11 additions and 11 deletions
|
|
@ -162,17 +162,17 @@ func getHostConfigs(registry *registries.Registry, noDefaultEndpoint bool, mirro
|
|||
// create the default config, if it wasn't explicitly mentioned in the config section
|
||||
config, ok := hosts[host]
|
||||
if !ok {
|
||||
if c, err := defaultHostConfig(host, mirrorAddr, configForHost(registry.Configs, host)); err != nil {
|
||||
c, err := defaultHostConfig(host, mirrorAddr, configForHost(registry.Configs, host))
|
||||
if err != nil {
|
||||
logrus.Errorf("Failed to generate config for registry %s: %v", host, err)
|
||||
continue
|
||||
} else {
|
||||
if noDefaultEndpoint {
|
||||
c.Default = nil
|
||||
} else if host == "*" {
|
||||
c.Default = &templates.RegistryEndpoint{URL: &url.URL{}}
|
||||
}
|
||||
config = *c
|
||||
}
|
||||
if noDefaultEndpoint {
|
||||
c.Default = nil
|
||||
} else if host == "*" {
|
||||
c.Default = &templates.RegistryEndpoint{URL: &url.URL{}}
|
||||
}
|
||||
config = *c
|
||||
}
|
||||
|
||||
// track which endpoints we've already seen to avoid creating duplicates
|
||||
|
|
|
|||
|
|
@ -34,11 +34,11 @@ func Register(ctx context.Context, serviceController corev1.ServiceController, e
|
|||
rootlessClient, err = client.New(rootless.Sock)
|
||||
if err == nil {
|
||||
break
|
||||
} else {
|
||||
logrus.Infof("Waiting for rootless API socket %s: %v", rootless.Sock, err)
|
||||
time.Sleep(1 * time.Second)
|
||||
}
|
||||
logrus.Infof("Waiting for rootless API socket %s: %v", rootless.Sock, err)
|
||||
time.Sleep(1 * time.Second)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue