整理代码结构, 增加普通结构体单元测试
This commit is contained in:
28
field_config.go
Normal file
28
field_config.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user