env-required has pretty limited usage. As I can see you can set this parameters just for fist layer in config. If you put it in nested config like
type Config struct{
Baka BakaType yaml:"baka"
}
type BakaType struct{
ID string yaml:"id"
BakaLevel yaml:"baka_level" env-required:"true"
}
So this config gonna be valid even if BalaLevel is empty. Because this tag only work for Config, and it doesn't care about BakaType
(also docs is unclear, you need to find issue to know that syntax is env-required:"true")
env-required has pretty limited usage. As I can see you can set this parameters just for fist layer in config. If you put it in nested config like type Config struct{ Baka BakaType
yaml:"baka"
}type BakaType struct{ ID string
yaml:"id"
BakaLevelyaml:"baka_level" env-required:"true"
}So this config gonna be valid even if BalaLevel is empty. Because this tag only work for Config, and it doesn't care about BakaType (also docs is unclear, you need to find issue to know that syntax is env-required:"true")