Documentation ¶
Index ¶
- type BTool
- func (BTool) Format(format string, any ...any) string
- func (BTool) GetRequestIp(req *http.Request) string
- func (BTool) Int64DefaultValue(obj int64, def int64) int64
- func (BTool) IntDefaultValue(obj int, def int) int
- func (BTool) StringDefaultValue(obj string, def string) string
- func (BTool) StringToInt(obj string) int
- func (BTool) StringToListBySymbol(name string, symbol string) []string
- func (BTool) SubEndSymbol(name string, symbol string) string
- type FileUtils
- func (FileUtils) CreateDir(dir string) bool
- func (FileUtils) CreateFile(filePath string) (*os.File, error)
- func (FileUtils) GetFileTypeByFileName(name string) string
- func (FileUtils) GetMd5(file *multipart.FileHeader) (string, error)
- func (FileUtils) PathIsExist(fileAddr string) bool
- func (FileUtils) SaveFile(file *multipart.FileHeader, dst string) error
- type Snowflake
- type TimeUtils
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BTool ¶
type BTool struct{}
BTool 工具类
func (BTool) GetRequestIp ¶
GetRequestIp 解析请求中的IP
func (BTool) Int64DefaultValue ¶
Int64DefaultValue int64位的设置默认值
func (BTool) IntDefaultValue ¶
IntDefaultValue 为整型变量设置初始值
func (BTool) StringDefaultValue ¶
StringDefaultValue 为字符变量设置初始值
func (BTool) StringToListBySymbol ¶
StringToListBySymbol 根据分隔符将字符串进行拆分
type FileUtils ¶
type FileUtils struct{}
FileUtils 文件操作工具类
func (FileUtils) CreateFile ¶
CreateFile 创建一个文件
func (FileUtils) GetFileTypeByFileName ¶
GetFileTypeByFileName 根据文件名称获取到文件的类型
func (FileUtils) PathIsExist ¶
PathIsExist 判断文件或路径是否存在
type Snowflake ¶
type Snowflake struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.