Documentation
¶
Index ¶
- Variables
- func ConvertNameCase(opt meta.NameCase, name string) string
- func SplitGoTags(input string) []string
- func SplitPrefix(t string) (pkg, name string)
- func SplitSubfix(t string) (typ, val string)
- func SplitSubfix2(t string) (typ, val string)
- func SplitTagOptions(tag string) (ret []string, err error)
- func ToLowerCamelCase(name string) string
- func ToSnakeCase(name string) string
- func ToUpperCamelCase(name string) string
- type FieldIDMap
- type FieldNameMap
Constants ¶
This section is empty.
Variables ¶
View Source
var SonicUseInt64 = sonic.Config{ UseInt64: true, }.Froze()
Functions ¶
func SplitGoTags ¶
func SplitPrefix ¶
func SplitSubfix ¶
func SplitSubfix2 ¶
func SplitTagOptions ¶
func ToSnakeCase ¶
ToSnakeCase converts a camelCase string to snake_case.
func ToUpperCamelCase ¶
ToCamelCase converts a snake_case string to camelCase.
Types ¶
type FieldIDMap ¶ added in v0.4.1
type FieldIDMap struct {
// contains filtered or unexported fields
}
FieldIDMap is a map from field id to field descriptor
func (FieldIDMap) All ¶ added in v0.4.1
func (fd FieldIDMap) All() (ret []unsafe.Pointer)
All returns all field descriptors
func (FieldIDMap) Get ¶ added in v0.4.1
func (fd FieldIDMap) Get(id int32) unsafe.Pointer
Get gets the field descriptor for the given id
func (*FieldIDMap) Set ¶ added in v0.4.1
func (fd *FieldIDMap) Set(id int32, f unsafe.Pointer)
Set sets the field descriptor for the given id
func (FieldIDMap) Size ¶ added in v0.4.1
func (fd FieldIDMap) Size() int
Size returns the size of the map
type FieldNameMap ¶ added in v0.4.1
type FieldNameMap struct {
// contains filtered or unexported fields
}
FieldNameMap is a map for field name and field descriptor
func (FieldNameMap) All ¶ added in v0.4.1
func (ft FieldNameMap) All() []caching.Pair
All returns all field descriptors
func (*FieldNameMap) Build ¶ added in v0.4.1
func (ft *FieldNameMap) Build()
Build builds the map. It will try to build a trie tree if the dispersion of keys is higher enough (min).
func (FieldNameMap) Get ¶ added in v0.4.1
func (ft FieldNameMap) Get(k string) unsafe.Pointer
Get gets the field descriptor for the given key
func (*FieldNameMap) Set ¶ added in v0.4.1
func (ft *FieldNameMap) Set(key string, field unsafe.Pointer) (exist bool)
Set sets the field descriptor for the given key
func (FieldNameMap) Size ¶ added in v0.4.1
func (ft FieldNameMap) Size() int
Size returns the size of the map
Click to show internal directories.
Click to hide internal directories.