Skip to content

Commit 082b236

Browse files
committed
chore: quick update fix/version at 2025-09-26 11:35:35
1 parent 0fbd459 commit 082b236

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

config/envs.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ import (
1010
type EnvSpecMap map[string]*EnvSpec
1111

1212
type EnvSpec struct {
13-
Name string `yaml:"name"`
13+
Name string `yaml:"name"`
14+
15+
// Description Deprecated: use Desc instead.
1416
Description string `yaml:"description"`
17+
Desc string `yaml:"desc"`
1518
Default string `yaml:"default"`
1619
Value string `yaml:"value"`
1720
Required bool `yaml:"required"`
@@ -21,7 +24,7 @@ type EnvSpec struct {
2124
func initEnv(envMap EnvSpecMap) {
2225
for name, cfg := range envMap {
2326
cfg.Name = name
24-
27+
2528
envData := strings.TrimSpace(strutil.FirstNotEmpty(env.Get(name), cfg.Value, cfg.Default))
2629
if cfg.Required && envData == "" {
2730
panic("env " + cfg.Name + " is required")

monster/monster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func (m *Monster) VisitAll(fn func(*Entry)) {
6969
}
7070
}
7171

72-
func AddFunc(name string, get Getter, set Setter, usage string, tags ...map[string]any) {
72+
func Register(name string, get Getter, set Setter, usage string, tags ...map[string]any) {
7373
defaultMonster.AddFunc(name, get, set, usage, tags...)
7474
}
7575

0 commit comments

Comments
 (0)