first commit
This commit is contained in:
35
pkg/ddm/benchmark.go
Normal file
35
pkg/ddm/benchmark.go
Normal file
@ -0,0 +1,35 @@
|
||||
package ddm
|
||||
|
||||
import (
|
||||
"github.com/mritd/chinaid"
|
||||
)
|
||||
|
||||
type BType uint8
|
||||
|
||||
const (
|
||||
BMobile BType = iota
|
||||
BIDNo
|
||||
BName
|
||||
BBankNo
|
||||
BEmail
|
||||
BAddress
|
||||
)
|
||||
|
||||
func Benchmark(bType BType) string {
|
||||
switch bType {
|
||||
case BMobile:
|
||||
return chinaid.Mobile()
|
||||
case BIDNo:
|
||||
return chinaid.IDNo()
|
||||
case BEmail:
|
||||
return chinaid.Email()
|
||||
case BAddress:
|
||||
return chinaid.Address()
|
||||
case BName:
|
||||
return chinaid.Name()
|
||||
case BBankNo:
|
||||
return chinaid.BankNo()
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user