Documentation ¶
Index ¶
- func ExecLinuxShell(s string) (string, error)
- func FileMD5(file *os.File) string
- func FileSha1(file *os.File) string
- func GenSimpleRespStream(code int, msg string) []byte
- func GenSimpleRespString(code int, msg string) string
- func GetFileSize(filename string) int64
- func MD5(data []byte) string
- func PathExists(path string) (bool, error)
- func Sha1(data []byte) string
- type RespMsg
- type Sha1Stream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenSimpleRespStream ¶
GenSimpleRespStream : 只包含code和message的响应体([]byte)
func GenSimpleRespString ¶
GenSimpleRespString : 只包含code和message的响应体(string)
func GetFileSize ¶
func PathExists ¶
Types ¶
type RespMsg ¶
type RespMsg struct { Code int `json:"code"` Msg string `json:"msg"` Data interface{} `json:"data"` }
RespMsg : http响应数据的通用结构
func NewRespMsg ¶
NewRespMsg : 生成response对象
type Sha1Stream ¶
type Sha1Stream struct {
// contains filtered or unexported fields
}
func (*Sha1Stream) Sum ¶
func (obj *Sha1Stream) Sum() string
func (*Sha1Stream) Update ¶
func (obj *Sha1Stream) Update(data []byte)
Click to show internal directories.
Click to hide internal directories.