Documentation ¶
Overview ¶
pprof.go
Index ¶
- Variables
- func BytesToStringUnsafe(b []byte) string
- func DecodeFixed32(b []byte) (x uint32)
- func DecodeRawBytes(b []byte, alloc bool) (s []byte, alloc_len int)
- func DecodeVarint(b []byte) (x uint64, n int)
- func EncodeFixed32(b []byte, x uint32)
- func EncodeRawBytes(b []byte, s []byte) int
- func EncodeVarint(b []byte, x uint64) int
- func Exe(cmddir, cmdstr string) string
- func FileBase(path string) string
- func FileCreate(file string) (*os.File, error)
- func FileCreateAndWrite(path, content string) error
- func FileCreateAndWriteWithBom(path, content string) error
- func FileDelete(path string) error
- func FileDir(path string) (s string)
- func FileFullPath(path string) (s string)
- func FileIsExist(path string) bool
- func FileIsHidden(path string) bool
- func FileIterateDir(path, filter string, childrendir bool, callback func(file string) bool) error
- func FileIterateLine(path string, callback func(num int, line string) bool) error
- func FileLineNum(path string) (num int64)
- func FileMD5(path string) (string, error)
- func FileMakeDir(path string) error
- func FileModTime(path string) int64
- func FileMove(path string, to string) error
- func FileOnlyName(path string) string
- func FileOpenAppend(path string) (*os.File, error)
- func FileOpenWrite(path string) (*os.File, error)
- func FileReadAll(path string) ([]byte, error)
- func FileReadDir(path string, noHidden bool, fileList map[string]os.FileInfo)
- func FileReadLine(path string, line int) ([]string, error)
- func FileRename(path string, to string) error
- func FileSize(path string) int64
- func FileStdinHasData() bool
- func FileWriteAndAppend(path, content string) error
- func IntToString(i int64) string
- func IsFile(path string) bool
- func LockWaitGroup(num int, f func(int) int) []int
- func PProfSaveBlock(p string) error
- func PProfSaveMem(p string) error
- func PProfStartCPU(p string) error
- func PProfStopCPU(p string)
- func RFloat32(b []byte) float32
- func RFloat64(b []byte) float64
- func RInt16(b []byte) int16
- func RInt32(b []byte) int32
- func RInt64(b []byte) int64
- func RUint16(b []byte) (x uint16)
- func RUint32(b []byte) (x uint32)
- func RUint64(b []byte) (x uint64)
- func RVarint(b []byte, x uint64) (int, error)
- func ReflectMapValue(mp interface{}, key interface{}) interface{}
- func ReflectSliceIndex(sl interface{}, index int) interface{}
- func ReflectStructField(st interface{}, filedname string) interface{}
- func SSHExeCmd(client *ssh.Client, cmd string) (string, error)
- func SSHFile(user, keyFilePath, ip_port string) (*ssh.Client, error)
- func SSHNew(user, password, ip_port string) (*ssh.Client, error)
- func SSHScp2Local(client *ssh.Client, remoteFile string, localFilePath string, ...) (err error)
- func SSHScp2Remote(client *ssh.Client, localFile string, remotePathOrFile string, ...) (err error)
- func StringRegReplace(reg, s, new string) (string, error)
- func StringToBytesUnsafe(s string) []byte
- func StringToFloat(a string) float64
- func StringToFloatList(s, sep string) []float64
- func StringToInt(a string) int64
- func StringToIntList(s, sep string) []int64
- func StringToKVMap(s, sep1, sep2 string) map[string]string
- func StringToUint(a string) uint64
- func StringToUintList(s, sep string) []uint64
- func SysDaemon() error
- func SysLock()
- func SysWaitSignal()
- func Time2UnixM(t time.Time) int64
- func Time2UnixN(t time.Time) int64
- func Time2UnixS(t time.Time) int64
- func TimeFormat(t time.Time) string
- func TimeFormatNeno(t time.Time) string
- func TimeFormatYMD(t time.Time) string
- func TimeNow() time.Time
- func TimeParse(format, stime string) (time.Time, error)
- func TimeParseUTC(format, stime string) (time.Time, error)
- func TimeZeroClock(shift time.Duration) time.Time
- func TimerReset(t *time.Timer, d time.Duration)
- func UintToString(i uint64) string
- func Unix2Time(sec int64, nsec int64) time.Time
- func UnsafeBytesToString(b []byte) string
- func UnsafeStringToBytes(s string) []byte
- func WFloat32(b []byte, x float32)
- func WFloat64(b []byte, x float64)
- func WInt16(b []byte, x int16)
- func WInt32(b []byte, x int32)
- func WInt64(b []byte, x int64)
- func WUint16(b []byte, x uint16)
- func WUint32(b []byte, x uint32)
- func WUint64(b []byte, x uint64)
- func WVarint(b []byte) (x uint64, n int, e error)
- type HttpRequest
- func (req *HttpRequest) Cookie(cookie string) *HttpRequest
- func (req *HttpRequest) Do(method string, sUrl string) (resp *http.Response, body []byte, err error)
- func (req *HttpRequest) FormFile(params map[string]string, nameField, fileName string, file io.Reader) (*HttpRequest, error)
- func (req *HttpRequest) FormJson(s string) *HttpRequest
- func (req *HttpRequest) FormParm(k, v string) *HttpRequest
- func (req *HttpRequest) Get(sUrl string) (resp *http.Response, body []byte, err error)
- func (req *HttpRequest) Header(key, val string) *HttpRequest
- func (req *HttpRequest) Post(sUrl string) (resp *http.Response, body []byte, err error)
- func (req *HttpRequest) Proxy(p string) *HttpRequest
- func (req *HttpRequest) SkipVerify() *HttpRequest
- type Pair
- type STFile
- type TimeCost
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultContentType = "application/x-www-form-urlencoded; charset=utf-8" HTTPFORMContentType = "application/x-www-form-urlencoded" HTTPJSONContentType = "application/json" HTTPXMLContentType = "text/xml" HTTPFILEContentType = "multipart/form-data" )
HTTP content type
View Source
var DefaultHeaders = map[string]string{
"Connection": "keep-alive",
"Accept": "*/*",
"User-Agent": "Chrome",
}
DefaultHeaders define default headers
Functions ¶
func BytesToStringUnsafe ¶
func DecodeFixed32 ¶
func DecodeVarint ¶
func EncodeFixed32 ¶
func EncodeRawBytes ¶
func EncodeVarint ¶
func FileCreateAndWrite ¶
create a new file and write content
func FileIsHidden ¶
func FileIterateDir ¶
FileIterateDir walk files,filter: txt|jpg
func FileIterateLine ¶
FileIterateLine read line whithout bom,num begin with 1
func FileOnlyName ¶
func FileReadAll ¶
FileReadAll read file all content with bom
func FileReadDir ¶
get all files and dirs
func FileReadLine ¶ added in v1.1.0
FileReadLine read special lines content
func FileStdinHasData ¶
func FileStdinHasData() bool
func IntToString ¶
func PProfSaveMem ¶
func PProfStopCPU ¶
func PProfStopCPU(p string)
func ReflectMapValue ¶
func ReflectMapValue(mp interface{}, key interface{}) interface{}
func ReflectSliceIndex ¶
func ReflectSliceIndex(sl interface{}, index int) interface{}
func ReflectStructField ¶
func ReflectStructField(st interface{}, filedname string) interface{}
func SSHScp2Local ¶
func SSHScp2Remote ¶
func StringRegReplace ¶
func StringToBytesUnsafe ¶
func StringToFloat ¶
func StringToFloatList ¶
func StringToInt ¶
func StringToIntList ¶
func StringToKVMap ¶
func StringToUint ¶
func StringToUintList ¶
func SysWaitSignal ¶
func SysWaitSignal()
func Time2UnixM ¶
func Time2UnixN ¶
func Time2UnixS ¶
func TimeFormat ¶
func TimeFormatNeno ¶
func TimeFormatYMD ¶
func UintToString ¶
func UnsafeBytesToString ¶ added in v1.1.0
func UnsafeStringToBytes ¶ added in v1.1.0
Types ¶
type HttpRequest ¶
type HttpRequest struct {
// contains filtered or unexported fields
}
func (*HttpRequest) Cookie ¶
func (req *HttpRequest) Cookie(cookie string) *HttpRequest
func (*HttpRequest) FormFile ¶ added in v1.1.0
func (req *HttpRequest) FormFile(params map[string]string, nameField, fileName string, file io.Reader) (*HttpRequest, error)
params post form的数据 nameField 请求地址上传文件对应field fileName 文件名 file 文件
func (*HttpRequest) FormJson ¶
func (req *HttpRequest) FormJson(s string) *HttpRequest
func (*HttpRequest) FormParm ¶
func (req *HttpRequest) FormParm(k, v string) *HttpRequest
func (*HttpRequest) Header ¶
func (req *HttpRequest) Header(key, val string) *HttpRequest
func (*HttpRequest) Proxy ¶
func (req *HttpRequest) Proxy(p string) *HttpRequest
func (*HttpRequest) SkipVerify ¶
func (req *HttpRequest) SkipVerify() *HttpRequest
Click to show internal directories.
Click to hide internal directories.