-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathpumperror_string.go
38 lines (32 loc) · 965 Bytes
/
pumperror_string.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Code generated by "stringer -type PumpError"; DO NOT EDIT.
package medtronic
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[CommandRefused-8]
_ = x[SettingOutOfRange-9]
_ = x[BolusInProgress-12]
_ = x[InvalidHistoryPageNumber-13]
}
const (
_PumpError_name_0 = "CommandRefusedSettingOutOfRange"
_PumpError_name_1 = "BolusInProgressInvalidHistoryPageNumber"
)
var (
_PumpError_index_0 = [...]uint8{0, 14, 31}
_PumpError_index_1 = [...]uint8{0, 15, 39}
)
func (i PumpError) String() string {
switch {
case 8 <= i && i <= 9:
i -= 8
return _PumpError_name_0[_PumpError_index_0[i]:_PumpError_index_0[i+1]]
case 12 <= i && i <= 13:
i -= 12
return _PumpError_name_1[_PumpError_index_1[i]:_PumpError_index_1[i+1]]
default:
return "PumpError(" + strconv.FormatInt(int64(i), 10) + ")"
}
}