Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Female 女 Female = iota // Male 男 Male )
View Source
const ( // IDCardLength 身份证长度 IDCardLength = 18 // IDCardModBase 取模运算的基 IDCardModBase = 11 )
Variables ¶
View Source
var ( // ErrInvalidIDCardNo 身份证号不正确 ErrInvalidIDCardNo = fmt.Errorf("身份证号不合法") )
errors
Functions ¶
func Age ¶ added in v0.4.3
Age is shorthand for AgeAt(birthDate, time.Now()), and carries the same usage and limitations.
func SetLocation ¶ added in v0.4.3
func Transform15To18 ¶ added in v0.4.2
Types ¶
type Addr ¶
type Addr struct { Code int `json:"code"` // 这里之前是CityCode,改成三级以后,直接叫Code了 Province string `json:"province"` City string `json:"city"` District string `json:"district"` }
Addr 地址信息 修复问题: https://github.com/sleagon/chinaid/issues/1 改成3级划分了
type IDCardDetail ¶
IDCardDetail 解析出来的具体信息
func (IDCardDetail) GetAge ¶ added in v0.4.3
func (t IDCardDetail) GetAge() int
Click to show internal directories.
Click to hide internal directories.