base-golang/pkg/ddm/benchmark.go

36 lines
463 B
Go
Raw Permalink Normal View History

2024-07-23 10:23:43 +08:00
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 ""
}
}