Documentation
¶
Index ¶
- func ByteToFloat32(bytes []byte) float32
- func ByteToFloat64(bytes []byte) float64
- func Bytes2String(b []byte) string
- func BytesToInt(buf []byte) int32
- func BytesToInt16(buf []byte) int16
- func BytesToInt64(buf []byte) int64
- func Float32ToByte(float float32) []byte
- func Float64ToByte(float float64) []byte
- func GetFirstDateOfMonth(d time.Time) time.Time
- func GetLastDateOfMonth(d time.Time) time.Time
- func GetProgramPath(path string) string
- func GetZeroTime(d time.Time) time.Time
- func Int64ToBytes(n int64) []byte
- func IntToBytes(n int32) []byte
- func InterfaceToNumeric(val interface{}) interface{}
- func IsNumeric(val interface{}) bool
- func MustID() uint64
- func NumberToString(a interface{}) string
- func PathExists(path string) (bool, error)
- func RandomString(n int) string
- func String2Bytes(s string) []byte
- type HttpClient
- func (hkHttp *HttpClient) HttpGet(path string, headers map[string]string, bodys map[string]string) ([]byte, error)
- func (hkHttp *HttpClient) HttpPost(path string, headers map[string]string, bodys map[string]string) ([]byte, error)
- func (hkHttp *HttpClient) HttpPostJson(path string, bodys string) ([]byte, error)
- func (hkHttp *HttpClient) Init()
- type SafeMutexMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteToFloat32 ¶
func ByteToFloat64 ¶
func Bytes2String ¶
func Float32ToByte ¶
func Float64ToByte ¶
func GetFirstDateOfMonth ¶ added in v1.0.3
获取传入的时间所在月份的第一天,即某月第一天的0点。如传入time.Now(), 返回当前月份的第一天0点时间。
func GetLastDateOfMonth ¶ added in v1.0.3
获取传入的时间所在月份的最后一天,即某月最后一天的0点。如传入time.Now(), 返回当前月份的最后一天0点时间。
func GetProgramPath ¶
func InterfaceToNumeric ¶
func InterfaceToNumeric(val interface{}) interface{}
此方法需要配合上面的 IsNumeric 一起使用
func NumberToString ¶
func NumberToString(a interface{}) string
func RandomString ¶
func String2Bytes ¶
Types ¶
type HttpClient ¶
type HttpClient struct { Host string Port int32 AppKey string AppSecret string QueryNum int IsHttps bool HttpClient *http.Client }
func (*HttpClient) HttpPostJson ¶
func (hkHttp *HttpClient) HttpPostJson(path string, bodys string) ([]byte, error)
func (*HttpClient) Init ¶
func (hkHttp *HttpClient) Init()
type SafeMutexMap ¶
func New ¶
func New() *SafeMutexMap
func (*SafeMutexMap) Dump ¶
func (s *SafeMutexMap) Dump(w io.Writer)
func (*SafeMutexMap) Get ¶
func (s *SafeMutexMap) Get(key interface{}) interface{}
func (*SafeMutexMap) GetValue ¶
func (s *SafeMutexMap) GetValue(key interface{}) (interface{}, bool)
func (*SafeMutexMap) Remove ¶
func (s *SafeMutexMap) Remove(key interface{})
func (*SafeMutexMap) Set ¶
func (s *SafeMutexMap) Set(key interface{}, value interface{})
Click to show internal directories.
Click to hide internal directories.