diff --git a/go.sum b/go.sum index fffd354..2ef8931 100644 --- a/go.sum +++ b/go.sum @@ -13,6 +13,7 @@ github.com/chromedp/chromedp v0.5.3 h1:F9LafxmYpsQhWQBdCs+6Sret1zzeeFyHS5LkRF//F github.com/chromedp/chromedp v0.5.3/go.mod h1:YLdPtndaHQ4rCpSpBG+IPpy9JvX0VD+7aaLxYgYj28w= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dghubble/go-twitter v0.0.0-20200725221434-4bc8ad7ad1b4 h1:I60CX3+rWlBGPXR13jwxxBWB2GhlhZkEEh5o1eDLzJg= github.com/dghubble/go-twitter v0.0.0-20200725221434-4bc8ad7ad1b4/go.mod h1:xfg4uS5LEzOj8PgZV7SQYRHbG7jPUnelEiaAVJxmhJE= @@ -73,6 +74,7 @@ github.com/srwiley/rasterx v0.0.0-20200120212402-85cb7272f5e9/go.mod h1:mvWM0+15 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/webview/webview v0.0.0-20200724072439-e0c01595b361 h1:e0+/fQY5l9NdCwPsEg9S8AgE5lFhZ/6UX+b2KkpIBFg= github.com/webview/webview v0.0.0-20200724072439-e0c01595b361/go.mod h1:rpXAuuHgyEJb6kXcXldlkOjU6y4x+YcASKKXJNUhh0Y= @@ -114,4 +116,5 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/internal/config/config_test.go b/internal/config/config_test.go index bfc9e1d..68a8000 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -82,11 +82,12 @@ func TestGet(t *testing.T) { telegram: false, environment: func() {}, expected: &Config{ - Locale: "en_us", - Currency: "USD", - Delay: 500, - SKU: strPtr("5438481700"), - TestSKU: strPtr("5379432500"), + Locale: "en_us", + NvidiaLocale: "en-us", + Currency: "USD", + Delay: 500, + SKU: strPtr("5438481700"), + TestSKU: strPtr("5379432500"), }, }, "with sms": { @@ -97,11 +98,12 @@ func TestGet(t *testing.T) { telegram: false, environment: envSMS(), expected: &Config{ - Locale: "en_us", - Currency: "USD", - Delay: 0, - SKU: strPtr("5438481700"), - TestSKU: strPtr("5379432500"), + Locale: "en_us", + NvidiaLocale: "en-us", + Currency: "USD", + Delay: 0, + SKU: strPtr("5438481700"), + TestSKU: strPtr("5379432500"), TwilioConfig: TwilioConfig{ AccountSID: "1", Token: "2", @@ -118,11 +120,12 @@ func TestGet(t *testing.T) { telegram: false, environment: envDiscord(), expected: &Config{ - Locale: "en_us", - Currency: "USD", - Delay: 0, - SKU: strPtr("5438481700"), - TestSKU: strPtr("5379432500"), + Locale: "en_us", + NvidiaLocale: "en-us", + Currency: "USD", + Delay: 0, + SKU: strPtr("5438481700"), + TestSKU: strPtr("5379432500"), DiscordConfig: DiscordConfig{ WebhookURL: "1", }, @@ -136,11 +139,12 @@ func TestGet(t *testing.T) { telegram: false, environment: envTwitter(), expected: &Config{ - Locale: "en_us", - Currency: "USD", - Delay: 0, - SKU: strPtr("5438481700"), - TestSKU: strPtr("5379432500"), + Locale: "en_us", + NvidiaLocale: "en-us", + Currency: "USD", + Delay: 0, + SKU: strPtr("5438481700"), + TestSKU: strPtr("5379432500"), TwitterConfig: TwitterConfig{ ConsumerKey: "1", ConsumerSecret: "2", @@ -157,7 +161,9 @@ func TestGet(t *testing.T) { telegram: true, environment: envTelegram(), expected: &Config{ - Locale: "en_us", + Locale: "en_us", + NvidiaLocale: "en-us", + Currency: "USD", Delay: 0, SKU: strPtr("5438481700"),