aboutsummaryrefslogtreecommitdiff
path: root/event_string.go
blob: fc9466e86009b958188517004ac050dfcc45dce0 (plain)
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
// Code generated by "stringer -type=Event"; DO NOT EDIT.

package redbutton

import "fmt"

const (
	_Event_name_0 = "Unknown"
	_Event_name_1 = "LidClosedButtonPressedLidOpen"
)

var (
	_Event_index_0 = [...]uint8{0, 7}
	_Event_index_1 = [...]uint8{0, 9, 22, 29}
)

func (i Event) String() string {
	switch {
	case i == 0:
		return _Event_name_0
	case 21 <= i && i <= 23:
		i -= 21
		return _Event_name_1[_Event_index_1[i]:_Event_index_1[i+1]]
	default:
		return fmt.Sprintf("Event(%d)", i)
	}
}