整理代码结构, 增加普通结构体单元测试

This commit is contained in:
2025-03-23 14:20:49 +08:00
parent 7b830c8a9e
commit 9ef4123f38
7 changed files with 210 additions and 108 deletions

28
field_config.go Normal file
View File

@ -0,0 +1,28 @@
// Package dynamicstruct ...
//
// Description : dynamicstruct ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2025-03-23 14:07
package dynamicstruct
type fieldConfigImpl struct {
name string
pkg string
typ any
tag string
anonymous bool
}
// SetType 设置字段类型
func (f *fieldConfigImpl) SetType(typ any) IFieldConfig {
f.typ = typ
return f
}
// SetTag 设置字段标签
func (f *fieldConfigImpl) SetTag(tag string) IFieldConfig {
f.tag = tag
return f
}