Documentation
¶
Overview ¶
Example ¶
package main import ( "context" "fmt" "github.com/donutloop/toolkit/promise" ) func main() { done, errc := promise.Do(context.Background(), func(ctx context.Context) error { fmt.Println("do things") return nil }) select { case <-done: case err := <-errc: fmt.Printf("error: %v \n", err) } }
Output: do things
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RecoverError ¶
type RecoverError struct { Err interface{} Stack []byte }
func (*RecoverError) Error ¶
func (e *RecoverError) Error() string
Click to show internal directories.
Click to hide internal directories.