Skip to content

Commit

Permalink
Merge pull request #13 from 117503445/patch-1
Browse files Browse the repository at this point in the history
fix: addressTree's sequence is random
  • Loading branch information
guanguans authored Jan 21, 2022
2 parents e567497 + a858ce4 commit 876dd66
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions id_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ func GetInfo(id string, strict bool) (IdInfo, error) {

// 地址信息
addressInfo := getAddressInfo(code["addressCode"], code["birthdayCode"], strict)
var addressTree []string //nolint:prealloc
for _, val := range addressInfo {
addressTree = append(addressTree, val)
}
addressTree := []string{addressInfo["province"], addressInfo["city"], addressInfo["district"]}

// 是否废弃
var abandoned int
Expand Down

0 comments on commit 876dd66

Please sign in to comment.