From 4d8dfc1409ea46b5ac792e5ea587d4d0f59bbc66 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 8 Feb 2025 16:18:39 +0100 Subject: [PATCH] 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 --- daemon/cluster/services.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daemon/cluster/services.go b/daemon/cluster/services.go index ff1300f2d1..2f8437ce5f 100644 --- a/daemon/cluster/services.go +++ b/daemon/cluster/services.go @@ -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