We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e7e887d commit e349ba4Copy full SHA for e349ba4
internal/config/config.go
@@ -6,14 +6,14 @@ import (
6
)
7
8
type Gpt struct {
9
- ApiKey string `json:"api_key"` // eg. sk-xxxxxxxxxx
10
- Model string `json:"model"` // eg. gpt-3.5-turbo
+ ApiKey string `json:"api_key" mapstructure:"api_key"` // eg. sk-xxxxxxxxxx
+ Model string `json:"model" mapstructure:"model"` // eg. gpt-3.5-turbo
11
}
12
13
type Config struct {
14
- Lang string `json:"lang"`
15
- Env string `json:"env"` // eg. en, cn
16
- Gpt *Gpt `json:"gpt"`
+ Lang string `json:"lang" mapstructure:"lang"`
+ Env string `json:"env" mapstructure:"env"` // eg. en, cn
+ Gpt *Gpt `json:"gpt" mapstructure:"gpt"`
17
18
19
const configPath = ".leetcode.json"
0 commit comments