Documentation ¶
Index ¶
- Variables
- func AppendStorageContent(app string, fileName string, content string) error
- func CamelToSnake(s string) string
- func GetStorageContent(app string, fileName string) (string, error)
- func GetStorageJSON(app string, fileName string, v interface{}) error
- func GetStructFieldName(s interface{}) ([]string, error)
- func GetStructFieldNameToSnake(s interface{}) ([]string, error)
- func Logger(name string) *log.Logger
- func MD5(s string) string
- func ParseIP(s string) (net.IP, int)
- func PathExists(path string) bool
- func SetStorageContent(app string, fileName string, content string) error
- func SnakeToCamel(s string) string
- func StructCopyFields(a interface{}, b interface{}, fields ...string) error
- func StructToMap(obj interface{}) map[string]interface{}
- func StructToMapWithLowerKey(obj interface{}) map[string]interface{}
Constants ¶
This section is empty.
Variables ¶
View Source
var (
BasePath string
)
View Source
var (
LogPath string
)
Functions ¶
func AppendStorageContent ¶
func CamelToSnake ¶
*
- 驼峰转蛇形
- @description XxYy to xx_yy, XxYY to xx_y_y
- @param {string} s 需要转换的字符串
- @return {string} *
func GetStorageJSON ¶
func GetStructFieldName ¶
func PathExists ¶
func SnakeToCamel ¶
*
- 蛇形转驼峰
- @description xx_yy to XxYx, xx_y_y to XxYY
- @param {string} s 要转换的字符串
- @return {string} *
func StructCopyFields ¶
func StructToMap ¶
func StructToMap(obj interface{}) map[string]interface{}
func StructToMapWithLowerKey ¶
func StructToMapWithLowerKey(obj interface{}) map[string]interface{}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.