Lint fixes and testing workflow actions
This commit is contained in:
@@ -70,10 +70,14 @@ func sendMessage(client *Client) {
|
||||
}
|
||||
|
||||
fmt.Print("Account ID: ")
|
||||
fmt.Scanln(&req.AccountID)
|
||||
if _, err := fmt.Scanln(&req.AccountID); err != nil {
|
||||
checkError(fmt.Errorf("error reading account ID: %v", err))
|
||||
}
|
||||
|
||||
fmt.Print("Recipient (phone number or JID, e.g., 0834606792 or 1234567890@s.whatsapp.net): ")
|
||||
fmt.Scanln(&req.To)
|
||||
if _, err := fmt.Scanln(&req.To); err != nil {
|
||||
checkError(fmt.Errorf("error reading recipient: %v", err))
|
||||
}
|
||||
|
||||
fmt.Print("Message text: ")
|
||||
reader := os.Stdin
|
||||
@@ -101,10 +105,14 @@ func sendImage(client *Client, filePath string) {
|
||||
}
|
||||
|
||||
fmt.Print("Account ID: ")
|
||||
fmt.Scanln(&req.AccountID)
|
||||
if _, err := fmt.Scanln(&req.AccountID); err != nil {
|
||||
checkError(fmt.Errorf("error reading account ID: %v", err))
|
||||
}
|
||||
|
||||
fmt.Print("Recipient (phone number): ")
|
||||
fmt.Scanln(&req.To)
|
||||
if _, err := fmt.Scanln(&req.To); err != nil {
|
||||
checkError(fmt.Errorf("error reading recipient: %v", err))
|
||||
}
|
||||
|
||||
fmt.Print("Caption (optional): ")
|
||||
reader := os.Stdin
|
||||
@@ -151,10 +159,14 @@ func sendVideo(client *Client, filePath string) {
|
||||
}
|
||||
|
||||
fmt.Print("Account ID: ")
|
||||
fmt.Scanln(&req.AccountID)
|
||||
if _, err := fmt.Scanln(&req.AccountID); err != nil {
|
||||
checkError(fmt.Errorf("error reading account ID: %v", err))
|
||||
}
|
||||
|
||||
fmt.Print("Recipient (phone number): ")
|
||||
fmt.Scanln(&req.To)
|
||||
if _, err := fmt.Scanln(&req.To); err != nil {
|
||||
checkError(fmt.Errorf("error reading recipient: %v", err))
|
||||
}
|
||||
|
||||
fmt.Print("Caption (optional): ")
|
||||
reader := os.Stdin
|
||||
@@ -204,10 +216,14 @@ func sendDocument(client *Client, filePath string) {
|
||||
}
|
||||
|
||||
fmt.Print("Account ID: ")
|
||||
fmt.Scanln(&req.AccountID)
|
||||
if _, err := fmt.Scanln(&req.AccountID); err != nil {
|
||||
checkError(fmt.Errorf("error reading account ID: %v", err))
|
||||
}
|
||||
|
||||
fmt.Print("Recipient (phone number): ")
|
||||
fmt.Scanln(&req.To)
|
||||
if _, err := fmt.Scanln(&req.To); err != nil {
|
||||
checkError(fmt.Errorf("error reading recipient: %v", err))
|
||||
}
|
||||
|
||||
fmt.Print("Caption (optional): ")
|
||||
reader := os.Stdin
|
||||
|
||||
Reference in New Issue
Block a user