Documentation ¶
Index ¶
- Constants
- Variables
- func BranchToYuan(branch int) string
- func BytesToString(b []byte) string
- func CallFunction(function interface{}, args ...interface{}) (results []interface{}, err error)
- func Caller(skip int) (pc uintptr, file string, line int, ok bool)
- func CallerFrame(skip int) (*runtime.Frame, bool)
- func CreateFile(path string) error
- func CurrentDir() (path string, err error)
- func FileIsExist(path string) bool
- func HttpGet(rawUrl string, response io.Writer) error
- func HttpGetTimeout(rawUrl string, response io.Writer, timeout time.Duration) error
- func HttpPost(rawUrl string, body io.Reader, response io.Writer) error
- func HttpPostTimeout(rawUrl string, body io.Reader, response io.Writer, timeout time.Duration) error
- func HttpRequest(method, rawUrl string, req io.Reader, rsp io.Writer, timeout time.Duration, ...) error
- func HttpsGet(rawUrl string, response io.Writer, tlsCfg *tls.Config) error
- func HttpsGetTimeout(rawUrl string, response io.Writer, timeout time.Duration, tlsCfg *tls.Config) error
- func HttpsPost(rawUrl string, body io.Reader, response io.Writer, tlsCfg *tls.Config) error
- func HttpsPostTimeout(rawUrl string, body io.Reader, response io.Writer, timeout time.Duration, ...) error
- func IdCardSex(number string) (sex, error)
- func JsonDecoding(r io.Reader, v interface{}) error
- func JsonEncoding(v interface{}, w io.Writer) error
- func JsonIterDecoding(r io.Reader, v interface{}) error
- func JsonIterEncoding(v interface{}, w io.Writer) error
- func LocalIP() (string, error)
- func LocalIPByTcpDial(address string, timeout time.Duration) (string, error)
- func MakeDir(path string) error
- func OpenFile(path string, flag int, perm os.FileMode) (file *os.File, err error)
- func RandomCode(length int) []byte
- func ReadDir(path string, reader func(os.FileInfo) bool) error
- func RemoveDir(path string) error
- func RemoveFile(path string) error
- func StringToBytes(s string) []byte
- func YuanToBranch(yuan string) (int64, error)
Constants ¶
View Source
const ( SexUnknown sex = iota SexMan SexWoman )
Variables ¶
View Source
var (
InvalidFunction = errors.New("the function is not a Func type")
)
View Source
var InvalidIdCardNumber = errors.New("invalid id card number")
View Source
var LocalIpEmptyErr = errors.New("local ip empty")
Functions ¶
func BytesToString ¶
func CallFunction ¶
func CallFunction(function interface{}, args ...interface{}) (results []interface{}, err error)
func CreateFile ¶
func CurrentDir ¶
func FileIsExist ¶
func HttpGetTimeout ¶
func HttpPostTimeout ¶
func HttpRequest ¶
func HttpsGetTimeout ¶
func HttpsPostTimeout ¶
func JsonDecoding ¶
func JsonEncoding ¶
func JsonIterDecoding ¶
func JsonIterEncoding ¶
func LocalIPByTcpDial ¶
func RandomCode ¶
func RemoveFile ¶
func StringToBytes ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.