Documentation
¶
Overview ¶
Package human 中国身份证验证与生成
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IDAreas ¶
IDAreas 获取全国 县以上行政区划代码 定期更新数据,具体见本目录下的 idcard.go
eg: IDAreas() ->
{
"110000": "北京市",
"110101": "东城区",
"110102": "西城区",
...
"440000": "广东省",
"440100": "广州市",
"440103": "荔湾区",
"440104": "越秀区",
"440105": "海珠区",
"440106": "天河区",
...
}
func IDGenerate ¶
IDGenerate 生成身份证信息
year, month, day 出生年月日
sex 性别,0 女,1 男
areaCode 区域编码,所有区域可以通过 IDAreas() 获取
count 生成身份证个数
return 身份证信息
eg:
codes, err := IDGenerate(1999, 10, 1, 1, "440106", 5)
-> [440106199910016594 440106199910012155 440106199910013238 440106199910013959 440106199910019074]
Types ¶
Click to show internal directories.
Click to hide internal directories.