摘要:
里面解释挺好的 https://www.cnblogs.com/cjsblog/p/9277677.html 阅读全文
posted @ 2023-02-19 23:28
lunar-华仔
阅读(13)
评论(0)
推荐(0)
摘要:
因为validator官方没有提供验证手机号码的逻辑,所以得自己定义 1.编写验证函数 // ValidateMobile// 验证手机号码是否正确func ValidateMobile(f1 validator.FieldLevel) bool { mobile := f1.Field().Str 阅读全文
posted @ 2023-02-19 21:05
lunar-华仔
阅读(178)
评论(0)
推荐(0)
摘要:
测试一:type ServerConfig struct { ServiceName string `mapstructure:"name"` Age int `mapstructure:"age"`}func main() { v := viper.New() //文件路径设置 v.SetConf 阅读全文
posted @ 2023-02-19 00:40
lunar-华仔
阅读(199)
评论(0)
推荐(0)

浙公网安备 33010602011771号