From 0a4e14c03a3a7e2a2ff1d232fced25eb22f5ab3a Mon Sep 17 00:00:00 2001 From: ringsaturn Date: Tue, 5 Dec 2023 11:36:05 +0800 Subject: [PATCH] fix --- client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client.go b/client.go index 8398ab0..63f542d 100644 --- a/client.go +++ b/client.go @@ -145,12 +145,12 @@ func NewClient(subscriptionKey string, region Region, opts ...Option) Client { c := &baseClient{ subscriptionKey: subscriptionKey, region: region, + authURL: fmt.Sprintf(tokenRefreshAPI, region.String()), + ttsURL: fmt.Sprintf(textToSpeechAPI, region.String()), tokenSaver: &memorySaver{}, client: http.DefaultClient, autoRefreshFn: newAutoRefresh(), } - c.authURL = fmt.Sprintf(tokenRefreshAPI, c.region.String()) - c.ttsURL = fmt.Sprintf(textToSpeechAPI, c.region.String()) for _, opt := range opts { opt(c) }