mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-08 14:42:27 +08:00
refactor: add function comment for tag.go
This commit is contained in:
@@ -57,7 +57,7 @@ func New(value any, tagName ...string) *Struct {
|
||||
// // custom map key
|
||||
// Name string `json:"myName"`
|
||||
//
|
||||
// Only the exported fields of a struct can be converted.
|
||||
// ToMap conver the exported fields of a struct to map.
|
||||
func (s *Struct) ToMap() (map[string]any, error) {
|
||||
if !s.IsStruct() {
|
||||
return nil, errInvalidStruct(s)
|
||||
|
||||
Reference in New Issue
Block a user