()
| 15 | } |
| 16 | |
| 17 | func (s KeyStatus) Int() int { |
| 18 | switch s { |
| 19 | case KeyDisable: |
| 20 | return 0 |
| 21 | case KeyNormal: |
| 22 | return 1 |
| 23 | case KeyError: |
| 24 | return 2 |
| 25 | case KeyExceed: |
| 26 | return 3 |
| 27 | case KeyExpired: |
| 28 | return 4 |
| 29 | default: |
| 30 | return 0 |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | func ToKeyStatus(status int) KeyStatus { |
| 35 | switch status { |
no outgoing calls
no test coverage detected