gb11643

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2021 License: MIT Imports: 2 Imported by: 1

Documentation

Overview

Package gb11643 解析身分证详情

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidFormat = errors.New("无效的格式")

ErrInvalidFormat 身份证号码格式错误

Functions

func IsValid

func IsValid(val []byte) bool

IsValid 判断一个身份证是否符合 gb11643 标准

Types

type GB11643

type GB11643 struct {
	Raw    string    // 原始数据
	Region string    // 区域代码
	Date   time.Time // 出生年月
	IsMale bool      // 是否为男姓,否为女生
}

GB11643 身份证信息

func Parse

func Parse(bs string) (*GB11643, error)

Parse 分析身份证信息

不作正确性检测,如有需求,请使用 is.GB11643

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL