Lint fixes and testing workflow actions
Some checks failed
CI / Lint (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / Test (1.23) (push) Has been cancelled
CI / Test (1.22) (push) Has been cancelled

This commit is contained in:
2025-12-29 10:24:18 +02:00
parent 767a9e211f
commit a3eca09502
20 changed files with 532 additions and 119 deletions

View File

@@ -95,16 +95,25 @@ func addHook(client *Client) {
scanner := bufio.NewScanner(os.Stdin)
fmt.Print("Hook ID: ")
fmt.Scanln(&hook.ID)
if _, err := fmt.Scanln(&hook.ID); err != nil {
checkError(fmt.Errorf("error reading hook ID: %v", err))
}
fmt.Print("Hook Name: ")
fmt.Scanln(&hook.Name)
if _, err := fmt.Scanln(&hook.Name); err != nil {
checkError(fmt.Errorf("error reading hook name: %v", err))
}
fmt.Print("Webhook URL: ")
fmt.Scanln(&hook.URL)
if _, err := fmt.Scanln(&hook.URL); err != nil {
checkError(fmt.Errorf("error reading webhook URL: %v", err))
}
fmt.Print("HTTP Method (POST): ")
fmt.Scanln(&hook.Method)
if _, err := fmt.Scanln(&hook.Method); err == nil {
// Successfully read input
fmt.Printf("Selected Method %s", hook.Method)
}
if hook.Method == "" {
hook.Method = "POST"
}