Use typed enums for cleaner parsing.
This commit is contained in:
parent
8d2b15a7c8
commit
553966ac87
5 changed files with 33 additions and 40 deletions
|
@ -1,15 +1,21 @@
|
|||
package configparser
|
||||
|
||||
const (
|
||||
DeviceTypePhysical = "physical"
|
||||
DeviceTypeVirtual = "virtual"
|
||||
type DeviceType string
|
||||
|
||||
RuleTypeButton = "button"
|
||||
RuleTypeButtonCombo = "button-combo"
|
||||
RuleTypeButtonLatched = "button-latched"
|
||||
RuleTypeAxis = "axis"
|
||||
RuleTypeAxisCombined = "axis-combined"
|
||||
RuleTypeAxisToButton = "axis-to-button"
|
||||
RuleTypeAxisToRelaxis = "axis-to-relaxis"
|
||||
RuleTypeModeSelect = "mode-select"
|
||||
const (
|
||||
DeviceTypePhysical DeviceType = "physical"
|
||||
DeviceTypeVirtual DeviceType = "virtual"
|
||||
)
|
||||
|
||||
type RuleType string
|
||||
|
||||
const (
|
||||
RuleTypeButton RuleType = "button"
|
||||
RuleTypeButtonCombo RuleType = "button-combo"
|
||||
RuleTypeButtonLatched RuleType = "button-latched"
|
||||
RuleTypeAxis RuleType = "axis"
|
||||
RuleTypeAxisCombined RuleType = "axis-combined"
|
||||
RuleTypeAxisToButton RuleType = "axis-to-button"
|
||||
RuleTypeAxisToRelaxis RuleType = "axis-to-relaxis"
|
||||
RuleTypeModeSelect RuleType = "mode-select"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue