chore(promises): make a Status function part of the Promise interface
This commit is contained in:
parent
4d3e266b07
commit
eb9d5f861a
7 changed files with 27 additions and 15 deletions
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue