Documentation ¶
Index ¶
- func ApplyTemplate(temp string, data map[string]interface{}) (string, error)
- func ContainsString(slice []string, s string) bool
- func DecodeBase64(in string) (string, error)
- func DelMapElement(m map[string]string, key string)
- func DiffSlice(oldSlice, newSlice []string) (deletes, adds []string)
- func DiffString(oldS, newS, separator string) (deletes, adds []string)
- func EncodeBase64(in string) string
- func ExecCommand(cmd string) ([]byte, error)
- func ExecCommandString(cmd string) (string, error)
- func GetCurrentDirectory() string
- func GetIPs() (ips []string)
- func GetMacAddrs() (macAddrs []string)
- func GetRandomSalt() string
- func GetRandomString(len int) string
- func If(condition bool, trueVal, falseVal interface{}) interface{}
- func In(target string, source []string) bool
- func IsDir(path string) bool
- func Jiami(code string) string
- func MD5(text string) string
- func ParseJson(data string, header http.Header) (map[string]interface{}, error)
- func SliceBothBySlice(s1, s2 []string) []string
- func SliceContainer(s []string, sub string) bool
- func SliceEqual(s1, s2 []string) bool
- func SliceJoinBySlice(s1, s2 []string) []string
- func SliceOnlyBySlice(s1, s2 []string) []string
- func SliceRemoveDuplication(list []string) []string
- func SliceRemoveStr(s []string, sub string) []string
- func WriteFile(path string, data []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyTemplate ¶
渲染模板
func ContainsString ¶
func DelMapElement ¶
func DiffString ¶
DiffString 按separator分割oldS+newS oldS 中存在newS中不存在的放到deletes数组 newS 中存在oldS中不存在的放到adds数组
func ExecCommand ¶
func ExecCommandString ¶
func GetCurrentDirectory ¶
func GetCurrentDirectory() string
func SliceBothBySlice ¶
SliceBothBySlice 返回同时存在s1和s2数组
func SliceEqual ¶
SliceEqual s1和s2数组是否数据一致 - 注意这里不判断顺序一致 只判断字符是否存在
func SliceJoinBySlice ¶
SliceJoinBySlice 返回s1+s2数组 - 去重
func SliceOnlyBySlice ¶
SliceOnlyBySlice 返回s1存在但是s2不存在的数组
func SliceRemoveDuplication ¶
SliceRemoveDuplication 数组去重: 顺序会乱
func SliceRemoveStr ¶
SliceRemoveStr 删除数组中存在的str 返回返回剩余项
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.