Documentation
¶
Index ¶
- Constants
- func ContainsStrSli(A []string, a string) bool
- func GetCallerInfo(level int) (caller string, fileName string, lineNum int)
- func Http(method, url, username, password string, data []byte) (*http.Response, error)
- func HttpDelete(url, username, password string, data []byte) (*http.Response, error)
- func HttpGet(url, username, password string) (*http.Response, error)
- func HttpPost(url, username, password string, data []byte) (*http.Response, error)
- func PanicHandler() (caller string, fileName string, lineNum int, stackTrace string, ...)
- func Retry(interval time.Duration, round int, retry func() (bool, error)) (bool, error)
Constants ¶
View Source
const ( HTTPGet string = "GET" HTTPPost string = "POST" HTTPDelete string = "DELETE" HTTPPut string = "PUT" )
Variables ¶
This section is empty.
Functions ¶
func ContainsStrSli ¶
ContainsStrSli returns true if the a exists in the slice A.
func GetCallerInfo ¶
GetCallerInfo returns the name of method caller and file name. It also returns the line number.
func HttpDelete ¶
func PanicHandler ¶
func PanicHandler() (caller string, fileName string, lineNum int, stackTrace string, rec interface{})
PanicHandler catches a panic and logs an error. Suppose to be called via defer.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.