From a2d7369c726521881c0e87c92ede937cb15aff77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20T=C3=B6lle?= Date: Mon, 2 Feb 2026 14:48:26 +0100 Subject: [PATCH] refactor: remove unused methods --- internal/cmd/util/util.go | 7 ------- internal/state/command_helpers.go | 9 --------- 2 files changed, 16 deletions(-) diff --git a/internal/cmd/util/util.go b/internal/cmd/util/util.go index e6d1a04e4..7be0c4279 100644 --- a/internal/cmd/util/util.go +++ b/internal/cmd/util/util.go @@ -410,13 +410,6 @@ func FormatHcloudError(err error) string { } } -func OptionalString(s *string, defaultValue string) string { - if s == nil || *s == "" { - return defaultValue - } - return *s -} - // WeekdayFromString converts a string representation of a weekday to a time.Weekday. // It accepts full names (e.g., "Monday") and abbreviations (e.g., "Mon"). It is case-insensitive. // It also accepts numbers (0-6) where 0 is Sunday, 1 is Monday, ..., and 6 is Saturday. diff --git a/internal/state/command_helpers.go b/internal/state/command_helpers.go index b82aecedb..aba034de0 100644 --- a/internal/state/command_helpers.go +++ b/internal/state/command_helpers.go @@ -17,12 +17,3 @@ type ActionWaiter interface { type TokenEnsurer interface { EnsureToken(cmd *cobra.Command, args []string) error } - -func WrapCtx( - ctx context.Context, - fn func(context.Context, *cobra.Command, []string) error, -) func(*cobra.Command, []string) error { - return func(cmd *cobra.Command, args []string) error { - return fn(ctx, cmd, args) - } -}