benchmark.go 463 B

1234567891011121314151617181920212223242526272829303132333435
  1. package ddm
  2. import (
  3. "github.com/mritd/chinaid"
  4. )
  5. type BType uint8
  6. const (
  7. BMobile BType = iota
  8. BIDNo
  9. BName
  10. BBankNo
  11. BEmail
  12. BAddress
  13. )
  14. func Benchmark(bType BType) string {
  15. switch bType {
  16. case BMobile:
  17. return chinaid.Mobile()
  18. case BIDNo:
  19. return chinaid.IDNo()
  20. case BEmail:
  21. return chinaid.Email()
  22. case BAddress:
  23. return chinaid.Address()
  24. case BName:
  25. return chinaid.Name()
  26. case BBankNo:
  27. return chinaid.BankNo()
  28. default:
  29. return ""
  30. }
  31. }