From 68342af99eca5a660c55c7224cdabb5e9c7d7895 Mon Sep 17 00:00:00 2001 From: Nightshift Date: Sat, 18 Apr 2026 20:53:38 +0000 Subject: [PATCH] [nightshift] dead-code: remove unused ResolvePath and RunWithTimeout --- internal/config/config.go | 11 ----------- internal/platform/exec.go | 7 ------- 2 files changed, 18 deletions(-) diff --git a/internal/config/config.go b/internal/config/config.go index b608e46..1c52885 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -8,7 +8,6 @@ import ( "errors" "fmt" "os" - "path/filepath" "strings" "github.com/tailstick/tailstick/internal/model" @@ -83,16 +82,6 @@ func FindPreset(cfg model.Config, id string) (model.Preset, error) { return model.Preset{}, fmt.Errorf("preset %q not found", id) } -func ResolvePath(baseDir, path string) string { - if path == "" { - return "" - } - if filepath.IsAbs(path) { - return path - } - return filepath.Join(baseDir, path) -} - func ResolvePresetSecrets(p model.Preset) model.Preset { out := p if strings.TrimSpace(out.AuthKey) == "" && strings.TrimSpace(out.AuthKeyEnv) != "" { diff --git a/internal/platform/exec.go b/internal/platform/exec.go index df7d34b..8ec9b5b 100644 --- a/internal/platform/exec.go +++ b/internal/platform/exec.go @@ -9,7 +9,6 @@ import ( "fmt" "os/exec" "strings" - "time" ) type Runner struct { @@ -33,9 +32,3 @@ func (r Runner) Run(ctx context.Context, args []string) (string, error) { } return out.String(), nil } - -func (r Runner) RunWithTimeout(timeout time.Duration, args []string) (string, error) { - ctx, cancel := context.WithTimeout(context.Background(), timeout) - defer cancel() - return r.Run(ctx, args) -}