37 lines
636 B
Go
37 lines
636 B
Go
// 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
|
|
}
|
|
|
|
func (f *fieldConfigImpl) GetType() any {
|
|
return f.typ
|
|
}
|
|
|
|
// SetTag 设置字段标签
|
|
func (f *fieldConfigImpl) SetTag(tag string) IFieldConfig {
|
|
f.tag = tag
|
|
return f
|
|
}
|
|
|
|
func (f *fieldConfigImpl) GetTag() string {
|
|
return f.tag
|
|
}
|