From 43e67bdffd9de9229c844f3496bd448a7dfebe87 Mon Sep 17 00:00:00 2001 From: marcel corso Date: Fri, 14 May 2021 10:17:43 +0200 Subject: [PATCH] even simpler url building for kavenegar --- provider/kavenegar/kavenegar.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/provider/kavenegar/kavenegar.go b/provider/kavenegar/kavenegar.go index e941abe..48289aa 100644 --- a/provider/kavenegar/kavenegar.go +++ b/provider/kavenegar/kavenegar.go @@ -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 }