Skip to content

Commit

Permalink
Merge pull request #1112 from iluyuns/master
Browse files Browse the repository at this point in the history
style: simplify range expression
  • Loading branch information
tr1v3r committed Apr 9, 2024
2 parents c18f4c0 + f3d4938 commit 435433a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion field/assign_attr.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (att *attrs) Values() interface{} {
if all {
return map[string]interface{}{}
}
for fn, _ := range fm {
for fn := range fm {
delete(values, fn)
}
return values
Expand Down
8 changes: 4 additions & 4 deletions field/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (tag Tag) Remove(key string) Tag {
}

func (tag Tag) Build() string {
if tag == nil || len(tag) == 0 {
if len(tag) == 0 {
return ""
}

Expand Down Expand Up @@ -92,7 +92,7 @@ func (tag GormTag) Remove(key string) GormTag {
}

func (tag GormTag) Build() string {
if tag == nil || len(tag) == 0 {
if len(tag) == 0 {
return ""
}
tags := make([]string, 0, len(tag))
Expand Down Expand Up @@ -128,7 +128,7 @@ func tagKeys(tag Tag) []string {
if len(tag) == 0 {
return keys
}
for k, _ := range tag {
for k := range tag {
keys = append(keys, k)
}
return keySort(keys)
Expand All @@ -139,7 +139,7 @@ func gormKeys(tag GormTag) []string {
if len(tag) == 0 {
return keys
}
for k, _ := range tag {
for k := range tag {
keys = append(keys, k)
}
return keySort(keys)
Expand Down

0 comments on commit 435433a

Please sign in to comment.