package
0.0.0-20230802011923-125c38c70052
Repository: https://github.com/go2rust1/cherry.git
Documentation: pkg.go.dev
# Functions
GetRStructFieldTags get reference struct filed tags
# Examples ``` type User struct { ID string `db:"id"` Name string `db:"name"` }
GetRStructFieldTags(&User{ID: "1", Name: "jason"}, "db") ```.
No description provided by the author
GetStructFieldTags get struct field tags
# Examples ``` type User struct { ID string `db:"id"` Name string `db:"name"` }
GetStructFieldTags(User{ID: "1", Name: "jason"}, "db") GetStructFieldTags(&User{ID: "1", Name: "jason"}, "db") ```.
GetStructFieldValues 获取结构体字段的值
# Examples ``` type User struct { ID string Name string }
GetStructFieldValues(User{ID: "1", Name: "jason"}) GetStructFieldValues(&User{ID: "1", Name: "jason"}).
GetVStructFieldTags get value struct filed tags
# Examples ``` type User struct { ID string `db:"id"` Name string `db:"name"` }
GetVStructFieldTags(User{ID: "1", Name: "jason"}, "db") ```.
No description provided by the author
StringSliceEqualFold compare whether two slice elements of same length are consistent.
TagDeepEqual compare whether the tags of two struct are equal
# Examples ``` type User struct { UID int `db:"id"` UName string `db:"name"` }
type Person struct { PID int `db:"ID"` PName string `db:"Name"` }
type Human struct { HID int `db:"hid"` HName string `db:"name"` }
true, nil := TagDeepEqual(User{}, Person{}, "db") false, nil := TagDeepEqual(User{}, Human{}, "db") ```.