Skip to content

Commit

Permalink
support array types
Browse files Browse the repository at this point in the history
  • Loading branch information
wkloucek committed Jul 1, 2022
1 parent 74c66cd commit 755f77b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/helpers/environment-variable-docs-generator.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ func GetAnnotatedVariables(s interface{}) []ConfigField {
continue
}
v := fmt.Sprintf("%v", value.Interface())
fields = append(fields, ConfigField{Name: strings.ReplaceAll(env, ";", "<br/>"), DefaultValue: html.EscapeString(strings.Replace(v, "|", "\\|", -1)), Description: desc, Type: value.Type().Name()})
typeName := value.Type().Name()
if typeName == "" {
typeName = value.Type().String()
}
fields = append(fields, ConfigField{Name: strings.ReplaceAll(env, ";", "<br/>"), DefaultValue: html.EscapeString(strings.Replace(v, "|", "\\|", -1)), Description: desc, Type: typeName})
case reflect.Ptr:
// PolicySelectors in the Proxy are being skipped atm
// they are not configurable via env vars, if that changes
Expand Down

0 comments on commit 755f77b

Please sign in to comment.