Documentation
¶
Overview ¶
* @Date: 2023-07-20 09:34:46 * @LastEditTime: 2023-07-20 10:26:35 * @Description:
* @Date: 2023-07-20 10:23:00 * @LastEditTime: 2023-07-20 10:23:01 * @Description:
* @Date: 2023-09-07 16:40:46 * @LastEditTime: 2023-09-07 16:40:47 * @Description:
Index ¶
- func Compare(a, b interface{}) int
- func CompareNumber(a, b interface{}) int
- func CompareString(a, b interface{}) int
- func Expand(s string, m map[string]interface{}) string
- func GetExtension(domain string) string
- func GetExternalIP() string
- func GetIntranetIP() string
- func GetLastChars(str string, num int) string
- func GetLocalMacAddr() (string, error)
- func Getenv(key string, defaults ...string) string
- func GetenvMap() map[string]string
- func If(cond bool, val1, val2 interface{}) interface{}
- func IsLetter(s uint8) bool
- func IsLetters(s string) bool
- func IsLinux() bool
- func IsMac() bool
- func IsNumeric(s string) bool
- func IsWin() bool
- func Join(v interface{}, sep string) string
- func LastInIndex(s, f string) int
- func Len(s string) int
- func Parse(obj interface{}, path string) interface{}
- func Replace(s string, replace map[string]string) string
- func Reverse(s string) string
- func SafeRun(f func()) (backErr error)
- func Setenv(key, value string) error
- func SpiltStr(str string) []string
- func ToString(v interface{}) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Expand ¶ added in v0.0.4
Expand replaces {var} of string s based on the value map m For example, Expand("i am {name}", map[string]interface{}{"name": "Li Kexian"})
func GetExtension ¶ added in v0.0.4
func GetLastChars ¶ added in v0.0.3
GetFirstChars returns first num chars of str
func GetLocalMacAddr ¶
GetLocalMacAddr @Description: get local mac address @return string @return error @author cx
func LastInIndex ¶ added in v0.0.4
LastInIndex find last position at first index
for example, LastInIndex("{{{{{{{{{{name}", "{")
↑
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.