mirror of
https://github.com/nikoksr/notify.git
synced 2025-02-01 12:58:01 +02:00
chore(fmt): run 'make fmt'
This commit is contained in:
parent
e859e76d77
commit
f7597a0fe5
@ -2,8 +2,9 @@ package textmagic
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
textMagic "github.com/textmagic/textmagic-rest-go-v2/v2"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
textMagic "github.com/textmagic/textmagic-rest-go-v2/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Service allow you to configure a TextMagic SDK client.
|
// Service allow you to configure a TextMagic SDK client.
|
||||||
@ -17,7 +18,6 @@ type Service struct {
|
|||||||
// New creates a new text magic client. Use your user-name and API key from
|
// New creates a new text magic client. Use your user-name and API key from
|
||||||
// https://my.textmagic.com/online/api/rest-api/keys.
|
// https://my.textmagic.com/online/api/rest-api/keys.
|
||||||
func New(userName, apiKey string) *Service {
|
func New(userName, apiKey string) *Service {
|
||||||
|
|
||||||
config := textMagic.NewConfiguration()
|
config := textMagic.NewConfiguration()
|
||||||
client := textMagic.NewAPIClient(config)
|
client := textMagic.NewAPIClient(config)
|
||||||
|
|
||||||
@ -35,7 +35,6 @@ func (s *Service) AddReceivers(phoneNumbers ...string) {
|
|||||||
|
|
||||||
// Send sends a SMS via TextMagic to all previously added receivers.
|
// Send sends a SMS via TextMagic to all previously added receivers.
|
||||||
func (s *Service) Send(ctx context.Context, subject, message string) error {
|
func (s *Service) Send(ctx context.Context, subject, message string) error {
|
||||||
|
|
||||||
auth := context.WithValue(ctx, textMagic.ContextBasicAuth, textMagic.BasicAuth{
|
auth := context.WithValue(ctx, textMagic.ContextBasicAuth, textMagic.BasicAuth{
|
||||||
UserName: s.userName,
|
UserName: s.userName,
|
||||||
Password: s.apiKey,
|
Password: s.apiKey,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user