Skip to content

Commit

Permalink
Fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
guanguans committed Apr 29, 2022
2 parents 4474806 + 840a2da commit 277e868
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

All notable changes to `guanguans/id-validator` will be documented in this file

## v1.1.11 - 2022-04-29

## What's Changed

- Bump actions/cache from 2.1.7 to 3 by @dependabot in https://github.com/guanguans/id-validator/pull/21
- Bump codecov/codecov-action from 2.1.0 to 3 by @dependabot in https://github.com/guanguans/id-validator/pull/22

**Full Changelog**: https://github.com/guanguans/id-validator/compare/v1.1.10...v1.1.11

## v1.1.10 - 2022-03-06

**Full Changelog**: https://github.com/guanguans/id-validator/compare/v1.1.9...v1.1.10
Expand Down
6 changes: 3 additions & 3 deletions data/address_code_timeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ func GetAddressCodeTimeline(code int) ([]map[string]string, bool) {

f, ok := provinceAddressCodeTimelinePluck[codeStr[:2]]
if !ok {
timeline, ok := getAddressCodeTimelineOther()[code]
timeline, ok := getAddressCodeTimelineAdditional()[code]
return timeline, ok
}

timeline, ok := f()[code]
if !ok {
timeline, ok := getAddressCodeTimelineOther()[code]
timeline, ok := getAddressCodeTimelineAdditional()[code]
return timeline, ok
}

Expand Down Expand Up @@ -51993,7 +51993,7 @@ func getAddressCodeTimelineTaiWan() map[int][]map[string]string {
}
}

func getAddressCodeTimelineOther() map[int][]map[string]string {
func getAddressCodeTimelineAdditional() map[int][]map[string]string {
return map[int][]map[string]string{
// 行政区划代码(地址码)补充数据
110100: {
Expand Down
4 changes: 2 additions & 2 deletions generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ func generatorBirthdayCode(addressCode string, address string, birthday string)
month := datePipeHandle(datePad(substr(birthday, 4, 6), "month"), "month")
day := datePipeHandle(datePad(substr(birthday, 6, 8), "day"), "day")

if timeLine, ok := data.GetAddressCodeTimeline(cast.ToInt(addressCode)); ok {
for _, val := range timeLine {
if timeline, ok := data.GetAddressCodeTimeline(cast.ToInt(addressCode)); ok {
for _, val := range timeline {
if val["address"] == address {
if val["start_year"] != "" {
startYear = val["start_year"]
Expand Down

0 comments on commit 277e868

Please sign in to comment.