Documentation ¶
Index ¶
- func CreateDir(path string) error
- func ExistsDirectory(path string) bool
- func ExistsFile(path string) bool
- func GetCurrentPath() (string, error)
- func GetCurrentPathNoError() string
- func IntSliceRemoveReplica(slc []int) []int
- func MapContainsKey(imap map[string]string, key string) bool
- func MapContainsValue(imap map[string]string, value string) bool
- func MapGetFirstKeyByValue(imap map[string]string, value string) string
- func MapVArrayContainsKey(imap map[string][]string, key string) bool
- func SaveBinary(filePath string, data []byte) error
- func SliceContainKey(slice []string, key string) bool
- func SliceContains(slice []string, key string) bool
- func StringSliceRemoveReplica(slc []string) []string
- type UUID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCurrentPath ¶
GetCurrentPath 获取当前程序运行路径
return string,error 当前运行路径,err 例如: E:/Go/ProjectTest/ <nil>
func GetCurrentPathNoError ¶
func GetCurrentPathNoError() string
GetCurrentPathNoError 获取当前程序运行路径
return string 当前运行路径,如果获取失败返回"" 例如: E:/Go/ProjectTest/ <nil>
func IntSliceRemoveReplica ¶
func MapGetFirstKeyByValue ¶
func SaveBinary ¶
func SliceContains ¶
s := reflect.ValueOf(slice) fmt.Println(s) for i := 0; i < s.Len(); i = i + 2 { if reflect.DeepEqual(key, s.Index(i).Interface()) { fmt.Println("True") return true } } return false } case reflect.Map: { if reflect.ValueOf(slice).MapIndex(reflect.ValueOf(key)).IsValid() { return true } return false } } return false }
Types ¶
Click to show internal directories.
Click to hide internal directories.