Skip to content

Commit ec3ee7d

Browse files
authored
Add baseurl default value for eppo client (#10)
1 parent 95c9d16 commit ec3ee7d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

eppoclient/config.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package eppoclient
22

3+
const default_base_url = "https://eppo.cloud/api"
4+
35
type Config struct {
4-
BaseUrl string `default:"https://eppo.cloud/api"`
6+
BaseUrl string
57
ApiKey string
68
AssignmentLogger AssignmentLogger
79
}
@@ -10,4 +12,8 @@ func (cfg *Config) validate() {
1012
if cfg.ApiKey == "" {
1113
panic("api key not set")
1214
}
15+
16+
if cfg.BaseUrl == "" {
17+
cfg.BaseUrl = default_base_url
18+
}
1319
}

0 commit comments

Comments
 (0)