future

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Future

func Future(f func() (interface{}, error)) func() (interface{}, error)

Future boilerplate method

func SimpleFuture

func SimpleFuture(url string) func() ([]byte, error)

Exec SimpleFuture to get the response. It's an implementation of Golang Future/Promise. reference: https://yushuangqi.com/blog/2017/golangli-de-future_promise.html

Params:
  url: request url
Returns:
  response body
  error, if error occurred

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL