Documentation ¶
Index ¶
- Constants
- func Capture(s, left, right string) string
- func DieIfParentGone()
- func ExecCommand(cmd string, args ...string) (string, error)
- func ExecShell(cmd string) (string, error)
- func Exists(path string) bool
- func FromJson(s string, v interface{})
- func GenUUids() string
- func GetVersion() string
- func HmacSha256(data string, secret string) string
- func HttpRequest(method, url string, headers map[string]string, body io.Reader) ([]byte, error)
- func HttpRequestJson(method string, url string, headers map[string]string, req interface{}, ...) error
- func MakeDir(path string) error
- func Milliseconds() int64
- func ReadFile(path string) string
- func RemoveDir(dirName string) error
- func RemoveFile(fileName string)
- func TimeNowString() string
- func ToBinary(vs ...interface{}) []byte
- func ToJson(v interface{}) string
- func Unzip(zipFile string, destDir string) error
- func Zip(srcFile string, destZip string) error
- type Config
- type Mutex
Constants ¶
View Source
const ( PRCTL_SYSCALL = 157 PR_SET_PDEATHSIG = 1 )
View Source
const HandyLayout = "2006-01-02 15:04:05.000"
Variables ¶
This section is empty.
Functions ¶
func DieIfParentGone ¶
func DieIfParentGone()
func GetVersion ¶
func GetVersion() string
func HmacSha256 ¶
func HttpRequest ¶
HttpRequest 发送request func SendRequest(url string, body io.Reader, addHeaders map[string]string, method string) ([]byte, error) {
func HttpRequestJson ¶
func HttpRequestJson(method string, url string, headers map[string]string, req interface{}, resp interface{}) error
HttpRequestJson 发送http请求。请求体和响应体都是json。
func Milliseconds ¶
func Milliseconds() int64
func RemoveFile ¶
func RemoveFile(fileName string)
func TimeNowString ¶
func TimeNowString() string
Types ¶
Click to show internal directories.
Click to hide internal directories.