Skip to content

Commit 785f3e4

Browse files
committed
Fix style
1 parent 6e49d6b commit 785f3e4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

data/address_code_timeline.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ var addressCodeTimelineProvincePluck = map[uint8]func() map[uint32][]map[string]
5151
}
5252

5353
func GetAddressCodeTimeline(code uint32) []map[string]string {
54+
if code < 110000 || code > 830000 {
55+
return []map[string]string{}
56+
}
57+
5458
f := addressCodeTimelineProvincePluck[uint8(math.Floor(float64(code)/10000))]
5559
if f == nil {
5660
return []map[string]string{}

id_validator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func FakeId() string {
116116
// sex 性别:1为男性,0为女性
117117
func FakeRequireId(isEighteen bool, address string, birthday string, sex int) string {
118118
// 生成地址码
119-
var addressCode string
119+
addressCode := ""
120120
if address == "" {
121121
for i, s := range data.AddressCode() {
122122
addressCode = cast.ToString(i)

0 commit comments

Comments
 (0)