Update go (#17)
Reviewed-on: #17 Co-authored-by: phoenix <mail@kundeng.us> Co-committed-by: phoenix <mail@kundeng.us>
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"git.kundeng.us/phoenix/textsender-models/tx0/config"
|
||||
axlry "git.kundeng.us/phoenix/textsender-models/tx0/config/auxiliary"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -24,7 +24,7 @@ func IsVersionFlagPresent() bool {
|
||||
}
|
||||
}
|
||||
|
||||
func ParseConfig(filepath string) (config config.TwilioConfig, success bool) {
|
||||
func ParseConfig(filepath string) (config axlry.TwilioConfig, success bool) {
|
||||
content, err := os.ReadFile(filepath)
|
||||
|
||||
log.Println("Reading config file...")
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"time"
|
||||
|
||||
"git.kundeng.us/phoenix/swoosh/swoop/send"
|
||||
cnfg "git.kundeng.us/phoenix/textsender-models/tx0/config"
|
||||
cnfg "git.kundeng.us/phoenix/textsender-models/tx0/config/auxiliary"
|
||||
"git.kundeng.us/phoenix/textsender-models/tx0/contact"
|
||||
msg "git.kundeng.us/phoenix/textsender-models/tx0/message"
|
||||
)
|
||||
@@ -24,7 +24,7 @@ func SendMessages(config cnfg.TwilioConfig, numbers [](contact.Contact), message
|
||||
numberToSend := number
|
||||
log.Println("Sending to: " + numberToSend.PhoneNumber)
|
||||
|
||||
if resp, err := snr.Send(message, number, nil); err != nil {
|
||||
if resp, _, err := snr.Send(message, number, nil); err != nil {
|
||||
log.Println("Error sending:", err)
|
||||
} else {
|
||||
if response, err := json.Marshal(*resp); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user