Improve config yaml schema (#16)
Leverages custom unmarshaling to be more declarative for our config specification. Reviewed-on: #16 Co-authored-by: Anna Rose Wiggins <annabunches@gmail.com> Co-committed-by: Anna Rose Wiggins <annabunches@gmail.com>
This commit is contained in:
parent
1a7b288083
commit
d9babf5dc0
8 changed files with 364 additions and 238 deletions
|
@ -8,19 +8,16 @@ type RuleTargetRelaxis struct {
|
|||
DeviceName string
|
||||
Device Device
|
||||
Axis evdev.EvCode
|
||||
Inverted bool
|
||||
}
|
||||
|
||||
func NewRuleTargetRelaxis(device_name string,
|
||||
device Device,
|
||||
axis evdev.EvCode,
|
||||
inverted bool) (*RuleTargetRelaxis, error) {
|
||||
axis evdev.EvCode) (*RuleTargetRelaxis, error) {
|
||||
|
||||
return &RuleTargetRelaxis{
|
||||
DeviceName: device_name,
|
||||
Device: device,
|
||||
Axis: axis,
|
||||
Inverted: inverted,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue