add hook for handler
change map to cmap for Trigger.hashs
This commit is contained in:
Yuzuki616
2024-10-30 01:07:17 +09:00
parent 3ff99d4fd1
commit ffcbec4ede
8 changed files with 75 additions and 10 deletions

18
handler/hook.go Normal file
View File

@@ -0,0 +1,18 @@
package handler
import (
"os"
"os/exec"
)
func (h *Handler) execHookCmd(cmd string, ares ...string) error {
c := exec.Command(cmd, ares...)
c.Stdin = os.Stdin
c.Stdout = os.Stdout
c.Stderr = os.Stderr
err := c.Run()
if err != nil {
return err
}
return nil
}