1
0
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:
dudaodong
2023-03-15 17:43:47 +08:00
parent f79693804b
commit 7261b281ad
4 changed files with 14 additions and 4 deletions

View File

@@ -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)