From 69a470f9bbf308b1d884d65d1ca0f0516efe5a48 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 05:05:28 +0000 Subject: [PATCH] fix(OPENFRAM-001): resumeHintError type is duplicated verbatim between eks and gke packages --- internal/cluster/providers/eks/resumehint.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/cluster/providers/eks/resumehint.go b/internal/cluster/providers/eks/resumehint.go index 70f6072d..10a49424 100644 --- a/internal/cluster/providers/eks/resumehint.go +++ b/internal/cluster/providers/eks/resumehint.go @@ -1,21 +1,21 @@ package eks +import "github.com/openframe/internal/shared/resumehint" + // resumeHintError carries a resume instruction that survives the generic // interruption handler. On Ctrl+C that handler prints only "Operation cancelled // by user." and discards err.Error(), so a hint wrapped only as message text is // lost. internal/shared/errors surfaces the hint via the ResumeHint() method // even for an interrupted operation. (The GKE twin: gke/resumehint.go.) -type resumeHintError struct { - err error - hint string -} - -func (e *resumeHintError) Error() string { return e.err.Error() } -func (e *resumeHintError) Unwrap() error { return e.err } -func (e *resumeHintError) ResumeHint() string { return e.hint } +// +// This is a thin alias over the shared implementation in +// internal/shared/resumehint to avoid duplicating the type/logic across +// provider packages (see OPENFRAM-001 for cross-package import aliasing +// conventions). +type resumeHintError = resumehint.Error // withResumeHint attaches hint to err structurally (not just in the message // text), so it survives the interruption handler that drops err.Error(). func withResumeHint(err error, hint string) error { - return &resumeHintError{err: err, hint: hint} + return resumehint.WithResumeHint(err, hint) }