1
0
Fork 0
mirror of https://github.com/Luzifer/streamdeck.git synced 2024-12-20 17:51:21 +00:00
streamdeck/cmd/streamdeck/action_reload.go
Knut Ahlers 131d09b78c
Add "reload_config" action
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2019-11-22 00:16:25 +01:00

17 lines
369 B
Go

package main
import "github.com/pkg/errors"
func init() {
registerAction("reload_config", actionReloadConfig{})
}
type actionReloadConfig struct{}
func (actionReloadConfig) Execute(attributes map[string]interface{}) error {
if err := loadConfig(); err != nil {
return errors.Wrap(err, "Unable to reload config")
}
return togglePage(userConfig.DefaultPage)
}