add TestMode to run actions without effect

This commit is contained in:
2023-08-16 01:27:28 +02:00
parent 381cc31d4b
commit 8f6fc72bfb
7 changed files with 56 additions and 20 deletions

View File

@@ -17,6 +17,11 @@ func (p Printer) Execute() {
p.ActionChan <- true
}
func (p Printer) DryExecute() {
fmt.Printf("Print action fire test. Message: %s", p.Message)
p.ActionChan <- true
}
func NewPrint(config internal.ActionConfig, c chan bool) (Action, error) {
var result Printer
err := json.Unmarshal(config.Options, &result)