diff options
| author | DJ O'Leary <dijitol@proton.me> | 2026-09-06 23:52:58 +0200 |
|---|---|---|
| committer | DJ O'Leary <dijitol@proton.me> | 2026-09-06 23:52:58 +0200 |
| commit | b8e691f0de5af5e124f7f25a53cfdeef84b049c5 (patch) | |
| tree | 78f0412ee0de954cce45d841af129190a8503daf | |
| parent | 4c1525d84968a5302ce2d87f923b84b56c5777eb (diff) | |
refactor(config): use string for api base url
| -rw-r--r-- | main.go | 2 | ||||
| -rw-r--r-- | src/config/config.go | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -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), |
