Zheng Xing
Zheng Xing
在 generate() 方法前面增加了四行语句: `tableConfig.setCountByExampleStatementEnabled(false); ` `tableConfig.setDeleteByExampleStatementEnabled(false); ` `tableConfig.setSelectByExampleStatementEnabled(false); ` `tableConfig.setUpdateByExampleStatementEnabled(false);` 仍然会在 model 中生成以 Example 结尾的类。
| | 数组 | 链表 | 哈希表 | | -------- | ------ | ------ | ------ | | 查找元素 | $O(n)$ | $O(n)$ | $O(1)$ | | 添加元素 | $O(1)$...
**问题描述**: 08validate/main.go 里的自定义验证函数 `bookabledate` 没有注册成功,报错了,错误信息如下: ``` Undefined validation function 'bookabledate' on field 'CheckIn' ~/go/pkg/mod/github.com/go-playground/validator/[email protected]/cache.go:289 (0xac919f8) (*Validate).parseFieldTagsRecursive: panic(strings.TrimSpace(fmt.Sprintf(undefinedValidation, current.tag, fieldName))) ~/go/pkg/mod/github.com/go-playground/validator/[email protected]/cache.go:150 (0xac90d2b) (*Validate).extractStructCache: ctag, _ = v.parseFieldTagsRecursive(tag, fld.Name, "", false) ~/go/pkg/mod/github.com/go-playground/validator/[email protected]/validator.go:37...