package
0.2.2
Repository: https://github.com/re-wi/gokitrewi.git
Documentation: pkg.go.dev

# Functions

basePath是固定目录路径,不包含具体的文件名,如果你传成了 /home/xx.txt, xx.txt也会被当成目录.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
获取根目录下直属所有文件(不包括文件夹及其中的文件).
No description provided by the author
获取当前项目根目录下所有文件(包括文件夹中的文件).
这个函数接收一个接口类型的参数,返回一个map[string]interface{}类型的值和一个bool类型的值,表示转换是否成功。在函数内部,使用类型断言将接口类型转换为map[string]interface{}类型,如果转换成功,则返回转换后的值和true;否则返回空map和false。.
该函数将接收一个接口类型的参数,该参数应该是一个切片,每个元素都应该是一个map[string]interface{}类型。该函数将返回一个map数组类型,每个元素都是一个map[string]interface{}类型。如果输入数据不符合要求,该函数将返回一个错误。.
通过 value.([]interface{}) 进行类型断言,将接口类型转换为 []interface{} 类型。然后遍历切片,并通过类型断言将每个元素转换为字符串类型。最终得到的字符串切片就是我们需要的 []string 类型.
No description provided by the author
你提供的 StructToMap 函数用于将结构体的字段映射为 map[string]string。.
trim space and equal.