🌱 Fix linting

Signed-off-by: Ettore Di Giacinto <mudler@mocaccino.org>
This commit is contained in:
Ettore Di Giacinto
2022-12-08 10:54:47 +01:00
parent 1e56ddef74
commit 6b13d26a33

View File

@@ -95,17 +95,19 @@ func Bootstrap(e *pluggable.Event) pluggable.EventResponse {
return ErrorEvent("Failed setup: %s", err.Error()) return ErrorEvent("Failed setup: %s", err.Error())
} }
return pluggable.EventResponse{} return pluggable.EventResponse{}
} else if tokenNotDefined { }
if tokenNotDefined {
return ErrorEvent("No network token provided, or `k3s` block configured. Exiting") return ErrorEvent("No network token provided, or `k3s` block configured. Exiting")
} }
// We might still want a VPN, but not to route traffic into // We might still want a VPN, but not to route traffic into
if kairosBlockisDefined && (!providerConfig.Kairos.Hybrid || providerConfig.Kairos.HybridVPN) { if !providerConfig.Kairos.Hybrid || providerConfig.Kairos.HybridVPN {
logger.Info("Configuring VPN") logger.Info("Configuring VPN")
if err := SetupVPN(services.EdgeVPNDefaultInstance, cfg.APIAddress, "/", true, providerConfig); err != nil { if err := SetupVPN(services.EdgeVPNDefaultInstance, cfg.APIAddress, "/", true, providerConfig); err != nil {
return ErrorEvent("Failed setup VPN: %s", err.Error()) return ErrorEvent("Failed setup VPN: %s", err.Error())
} }
} else if kairosBlockisDefined { } else {
logger.Info("Configuring API") logger.Info("Configuring API")
if err := SetupAPI(cfg.APIAddress, "/", true, providerConfig); err != nil { if err := SetupAPI(cfg.APIAddress, "/", true, providerConfig); err != nil {
return ErrorEvent("Failed setup VPN: %s", err.Error()) return ErrorEvent("Failed setup VPN: %s", err.Error())