From eb9d5f861a7b46a1827c2caa6abbfb8d77e29ffb Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sat, 23 Mar 2024 14:50:37 +0100 Subject: chore(promises): make a Status function part of the Promise interface --- pkg/custom.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'pkg/custom.go') diff --git a/pkg/custom.go b/pkg/custom.go index 9ed2bca..acca226 100644 --- a/pkg/custom.go +++ b/pkg/custom.go @@ -6,16 +6,11 @@ func init() { customPromises = make([]*CustomPromise, 0) } -type CustomPromiseInterface interface { - Promise - Status() Status -} - type CustomPromise struct { - promise CustomPromiseInterface + promise Promise } -func MakeCustomPromise(p CustomPromiseInterface) *CustomPromise { +func MakeCustomPromise(p Promise) *CustomPromise { return &CustomPromise{ promise: p, } -- cgit v1.2.3