summaryrefslogtreecommitdiffstats
path: root/internal/config/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/config/config.go')
-rw-r--r--internal/config/config.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index b8538be..9df03bf 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -14,6 +14,7 @@ type Config struct {
Timeout time.Duration
MaxRetries int
UserAgent string
+ Debug bool
}
type FileConfig struct {
@@ -45,6 +46,11 @@ func (c *Config) WithAPIKey(key string) *Config {
return c
}
+func (c *Config) WithDebug(debug bool) *Config {
+ c.Debug = debug
+ return c
+}
+
func (c *Config) Validate() error {
if c.APIKey == "" {
return ErrMissingAPIKey