Documentation ¶
Overview ¶
Package tool @Time : 2022/1/17 上午9:18 @Author: Jtyoui@qq.com @note : 名字规范工具类
Package tool @Time : 2022/1/17 上午9:40 @Author: Jtyoui@qq.com @note : 反射工具类
Package tool @Time : 2022/1/17 上午9:40 @Author: Jtyoui@qq.com @note : 扫码文件工具类
Package tool @Time : 2022/1/17 上午9:43 @Author: Jtyoui@qq.com @note : 关于字符串的处理工具类
Package tool @Time : 2022/1/17 下午5:51 @Author: Jtyoui@qq.com @note : 类型转化
Index ¶
- Constants
- func CamelCase(name string) string
- func Lower(name string) string
- func Pascal(name string) string
- func ReflectByValue(object interface{}) reflect.Value
- func RemovePtr(t reflect.Type) reflect.Type
- func ReplaceSepByFS(path string) string
- func SnakeToCamelCase(name string) string
- func StringToAny(str string, t reflect.Type) (r reflect.Value, err error)
- func Title(name string) string
- func Underline(name string) string
- func Upper(name string) string
- type GoFileScanner
- type Method
- type NameTo
Constants ¶
View Source
const DefaultName = "__local__"
Variables ¶
This section is empty.
Functions ¶
func ReflectByValue ¶
ReflectByValue 根据结构体获取该结构体的值类型, 传入的结构体必须是指针类型
func ReplaceSepByFS ¶
ReplaceSepByFS 判断是否是非Linux系统,全部的路径符号需要将\转为/ 在Fs中,所有的sep全是/
func SnakeToCamelCase ¶ added in v1.3.0
SnakeToCamelCase 将蛇形命名转为驼峰命名
func StringToAny ¶
StringToAny 将字符串转为基本类型
Types ¶
type GoFileScanner ¶
type GoFileScanner struct {
// contains filtered or unexported fields
}
func NewGoFileScanner ¶
func NewGoFileScanner(fs *embed.FS) *GoFileScanner
func (*GoFileScanner) GetFilePathByReflect ¶
func (s *GoFileScanner) GetFilePathByReflect(t reflect.Type) string
GetFilePathByReflect 根据反射来获取文件地址路径
func (*GoFileScanner) GetMethods ¶
func (s *GoFileScanner) GetMethods(name string) []Method
func (*GoFileScanner) ParseFile ¶
func (s *GoFileScanner) ParseFile(filename string) error
Click to show internal directories.
Click to hide internal directories.