Skip to content

Commit

Permalink
even simpler url building for kavenegar
Browse files Browse the repository at this point in the history
  • Loading branch information
marcel corso committed May 14, 2021
1 parent de74a13 commit 43e67bd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions provider/kavenegar/kavenegar.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ func NewKaveNegar(config Config) *KaveNegar {

// Building the API and call the KaveNegar endpoint to send SMS to the configured receptor from config.yaml
func (ns *KaveNegar) Send(message sachet.Message) error {
var str0, str1, str2 = "https://api.kavenegar.com/v1/", ns.APIToken, "/sms/send.json"
KaveNegarURL := fmt.Sprint(str0, str1, str2)
request, err := http.NewRequest("GET", KaveNegarURL, nil)
url := "https://api.kavenegar.com/v1/" + ns.APIToken + "/sms/send.json"
request, err := http.NewRequest("GET", url, nil)
if err != nil {
return err
}
Expand Down

0 comments on commit 43e67bd

Please sign in to comment.