From 80dba06ba021d3439f92b49cc4b5842e289e741b 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) }