Skip to content

EthanLiangX/gen-id

Folders and files

NameName
Last commit message
Last commit date

Latest commit

782cbfb · Oct 18, 2022

History

29 Commits
Oct 18, 2022
Oct 18, 2022
Oct 18, 2022
Jan 19, 2020
Mar 18, 2022
Oct 18, 2022
Oct 18, 2022
Oct 18, 2022
Oct 18, 2022
Oct 18, 2022
Oct 18, 2022
Sep 26, 2019

Repository files navigation

gen-id

一个身份证、名字、邮箱、地址、手机号码等随机生成的sdk

Installation

go get github.com/olongfen/gen-id

如果网速过慢:

export GO111MODULE=on
export GOPROXY=https://goproxy.io
go get github.com/olongfen/gen-id@master

Usage

    go build main.go
    ./main -count=10

Example

package main

import (
	"fmt"
	"github.com/olongfen/gen-id"
	"github.com/olongfen/gen-id/generator"
)

func main()  {
	// 生成总的信息
	fmt.Println(generator.NewGeneratorData(nil))
	// 分个单独获取
	g:=new(generator.GeneratorData)
	fmt.Println(g.GeneratorPhone())
	fmt.Println(g.GeneratorName())
	fmt.Println(g.GeneratorIDCart(nil))
	fmt.Println(g.GeneratorEmail())
	fmt.Println(g.GeneratorBankID())
	fmt.Println(g.GeneratorAddress())
}

Statement

本项目用于开发环境,涉及商业用途用本人无关

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages