This commit is contained in:
2024-01-14 18:40:47 -06:00
parent 12167e8d5a
commit a4430227e3
17 changed files with 13370 additions and 48 deletions

View File

@@ -18,7 +18,7 @@ type structInfo struct {
Tags reflect.StructTag
Type reflect.Type
DefaultValue interface{}
Secret interface{}
Secret bool
}
func getEnv[t string | bool | int | int64 | float64](env string, def t) (t, error) {
@@ -97,7 +97,7 @@ func getStructInfo(spec interface{}) ([]structInfo, error) {
f = f.Elem()
}
secret, err := typeConversion(ftype.Type.String(), ftype.Tag.Get("secret"))
secret, err := strconv.ParseBool((ftype.Tag.Get("secret")))
if err != nil {
secret = false
}