()
| 43 | } |
| 44 | |
| 45 | func (m ModelState) Int() int { |
| 46 | switch m { |
| 47 | case StateNormal: |
| 48 | return 1 |
| 49 | case StateAbnormal: |
| 50 | return 0 |
| 51 | default: |
| 52 | return -1 |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | func ModelStateFromInt(i int) ModelState { |
| 57 | switch i { |
nothing calls this directly
no outgoing calls
no test coverage detected