gogogo: github.com/mnhkahn/gogogo/util Index | Files

package util

import "github.com/mnhkahn/gogogo/util"

A util package collection.

For more information, goto godoc https://godoc.org/github.com/mnhkahn/gogogo/util

Chinese details, goto http://blog.cyeam.com//golang/2018/08/27/retry?utm_source=github

Index

Package Files

doc.go env_util.go http_util.go retry_util.go

func Goroutine Uses

func Goroutine() map[string]interface{}

Goroutine returns app detail, including numbers of goroutines, threads, CPU and GOMAXPROCS.

func HttpJson Uses

func HttpJson(method, url string, contentType string, body io.Reader, v interface{}) error

HttpJson sends a http request and unmarshal json response to v to return.

func HttpXml Uses

func HttpXml(method, url string, contentType string, body io.Reader, v interface{}) error

HttpXml sends a http request and unmarshal xml response to v to return.

func NoRetryError Uses

func NoRetryError(err error) stop

func Retry Uses

func Retry(attempts int, sleep time.Duration, fn func() error) error

Retry function. fn is the retry function.

Package util imports 10 packages (graph) and is imported by 1 packages. Updated 2018-09-03. Refresh now. Tools for package owners.