From b8e691f0de5af5e124f7f25a53cfdeef84b049c5 Mon Sep 17 00:00:00 2001 From: DJ O'Leary Date: Sun, 6 Sep 2026 23:52:58 +0200 Subject: refactor(config): use string for api base url --- main.go | 2 +- src/config/config.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 5feac24..313a57c 100644 --- a/main.go +++ b/main.go @@ -56,7 +56,7 @@ func Run( ) client := cardmarket.NewApiClient( - string(conf.CardmarketApiBaseURL), + conf.CardmarketApiBaseURL, oauthClient, ) diff --git a/src/config/config.go b/src/config/config.go index 3f3603a..2e597a1 100644 --- a/src/config/config.go +++ b/src/config/config.go @@ -43,7 +43,7 @@ func (auth *CardmarketApiAuth) String() string { } type Config struct { - CardmarketApiBaseURL []byte + CardmarketApiBaseURL string CardmarketApiAuth CardmarketApiAuth AppLogLevel slog.Level } @@ -81,7 +81,7 @@ func NewConfigFromEnv() (Config, error) { } return Config{ - CardmarketApiBaseURL: []byte(apiBaseURL), + CardmarketApiBaseURL: apiBaseURL, CardmarketApiAuth: CardmarketApiAuth{ AppToken: []byte(appToken), AppSecret: []byte(appSecret), -- cgit v1.2.3