daemon/cluster: make switches exhaustive (exhaustive)

Adding a `default` statement so that disabling the "default-signifies-exhaustive"
linter option will  make it show up.

    daemon/cluster/services.go:560:5: missing cases in switch of type api.LogStream: api.LogStreamUnknown (exhaustive)
                    switch msg.Stream {
                    ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-02-08 16:18:39 +01:00
parent 6929a3fd22
commit 4d8dfc1409

View File

@@ -562,6 +562,8 @@ func (c *Cluster) ServiceLogs(ctx context.Context, selector *backend.LogSelector
m.Source = "stdout"
case swarmapi.LogStreamStderr:
m.Source = "stderr"
default:
// TODO(thaJeztah): make switch exhaustive; add swarmapi.LogStreamUnknown
}
m.Line = msg.Data