util

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func Goroutine

func Goroutine() map[string]interface{}

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

func HttpJson

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

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

func NoRetryError(err error) stop

func Retry

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

Retry function. fn is the retry function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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