style: gofmt normalization — no logic changes
gofmt -w across the controller tree (46 files) so gofmt -l is empty — disarms the
formatting landmine where a targeted edit + accidental gofmt -w swept ~46 unrelated
files. Pure formatting: whitespace + gofmt's optional-semicolon removal in reflowed
inline closures. One doc comment reworded ('' -> 'the empty string') to avoid gofmt's
Go-1.19 doc-comment typographic substitition ('' -> curly quote) muddying its meaning.
No build/vet/test behavior change.
This commit is contained in:
@@ -44,13 +44,13 @@ type Handler interface {
|
||||
|
||||
// StatusInfo is returned by the API for UI display.
|
||||
type StatusInfo struct {
|
||||
Key string `json:"key"` // "onlyoffice:filebrowser"
|
||||
Key string `json:"key"` // "onlyoffice:filebrowser"
|
||||
Provider string `json:"provider"`
|
||||
Target string `json:"target"`
|
||||
Label string `json:"label"`
|
||||
Description string `json:"description"`
|
||||
Enabled bool `json:"enabled"`
|
||||
Status string `json:"status"` // "active", "error", "disabled", "provider_stopped", "target_unavailable"
|
||||
Status string `json:"status"` // "active", "error", "disabled", "provider_stopped", "target_unavailable"
|
||||
LastError string `json:"last_error,omitempty"`
|
||||
TargetDeployed bool `json:"target_deployed"`
|
||||
TargetRunning bool `json:"target_running"`
|
||||
|
||||
@@ -101,7 +101,12 @@ func (m *Manager) OnStackStart(_ context.Context, stackName string) {
|
||||
provStack, pOk := m.stacks.GetStack(provider)
|
||||
if !pOk || !provStack.Deployed || !isStackUp(provStack.State) {
|
||||
if m.isDebug() {
|
||||
m.logger.Printf("[DEBUG] [integrations] OnStackStart: skipping %s — provider %s not up (found=%v deployed=%v state=%v)", key, provider, pOk, pOk && provStack.Deployed, func() stacks.ContainerState { if pOk { return provStack.State }; return "" }())
|
||||
m.logger.Printf("[DEBUG] [integrations] OnStackStart: skipping %s — provider %s not up (found=%v deployed=%v state=%v)", key, provider, pOk, pOk && provStack.Deployed, func() stacks.ContainerState {
|
||||
if pOk {
|
||||
return provStack.State
|
||||
}
|
||||
return ""
|
||||
}())
|
||||
}
|
||||
continue
|
||||
}
|
||||
@@ -109,7 +114,12 @@ func (m *Manager) OnStackStart(_ context.Context, stackName string) {
|
||||
tgtStack, tOk := m.stacks.GetStack(target)
|
||||
if !tOk || !tgtStack.Deployed || !isStackUp(tgtStack.State) {
|
||||
if m.isDebug() {
|
||||
m.logger.Printf("[DEBUG] [integrations] OnStackStart: skipping %s — target %s not up (found=%v deployed=%v state=%v)", key, target, tOk, tOk && tgtStack.Deployed, func() stacks.ContainerState { if tOk { return tgtStack.State }; return "" }())
|
||||
m.logger.Printf("[DEBUG] [integrations] OnStackStart: skipping %s — target %s not up (found=%v deployed=%v state=%v)", key, target, tOk, tOk && tgtStack.Deployed, func() stacks.ContainerState {
|
||||
if tOk {
|
||||
return tgtStack.State
|
||||
}
|
||||
return ""
|
||||
}())
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -100,7 +100,12 @@ func (m *Manager) Toggle(ctx context.Context, provider, target string, enable bo
|
||||
// Validate: provider must be deployed and running
|
||||
provStack, pOk := m.stacks.GetStack(provider)
|
||||
if m.isDebug() {
|
||||
m.logger.Printf("[DEBUG] [integrations] Toggle: provider %s found=%v deployed=%v state=%v", provider, pOk, pOk && provStack.Deployed, func() stacks.ContainerState { if pOk { return provStack.State }; return "" }())
|
||||
m.logger.Printf("[DEBUG] [integrations] Toggle: provider %s found=%v deployed=%v state=%v", provider, pOk, pOk && provStack.Deployed, func() stacks.ContainerState {
|
||||
if pOk {
|
||||
return provStack.State
|
||||
}
|
||||
return ""
|
||||
}())
|
||||
}
|
||||
if !pOk || !provStack.Deployed {
|
||||
return state, fmt.Errorf("a szolgáltató alkalmazás (%s) nincs telepítve", provider)
|
||||
@@ -113,7 +118,12 @@ func (m *Manager) Toggle(ctx context.Context, provider, target string, enable bo
|
||||
if target != "filebrowser" {
|
||||
tgtStack, tOk := m.stacks.GetStack(target)
|
||||
if m.isDebug() {
|
||||
m.logger.Printf("[DEBUG] [integrations] Toggle: target %s found=%v deployed=%v state=%v", target, tOk, tOk && tgtStack.Deployed, func() stacks.ContainerState { if tOk { return tgtStack.State }; return "" }())
|
||||
m.logger.Printf("[DEBUG] [integrations] Toggle: target %s found=%v deployed=%v state=%v", target, tOk, tOk && tgtStack.Deployed, func() stacks.ContainerState {
|
||||
if tOk {
|
||||
return tgtStack.State
|
||||
}
|
||||
return ""
|
||||
}())
|
||||
}
|
||||
if !tOk || !tgtStack.Deployed {
|
||||
return state, fmt.Errorf("a célalkalmazás (%s) nincs telepítve", target)
|
||||
|
||||
@@ -32,7 +32,7 @@ func (h *OnlyOfficeNextcloudHandler) Apply(ac *ApplyContext) error {
|
||||
|
||||
// Install and configure OnlyOffice app in Nextcloud
|
||||
commands := []struct {
|
||||
args []string
|
||||
args []string
|
||||
tolerate string // substring in output to tolerate as success
|
||||
}{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user