add IntroductionVersion to adoc output

Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
Christian Richter
2024-07-19 09:08:57 +02:00
parent d48cae6fd3
commit 8975d413ef
2 changed files with 20 additions and 12 deletions
+17 -12
View File
@@ -19,12 +19,13 @@ import (
// ConfigField is the representation of one configuration field
type ConfigField struct {
EnvVars []string
DefaultValue string
Type string
Description string
VersionInfo string
DeprecationLink string
EnvVars []string
DefaultValue string
IntroductionVersion string
Type string
Description string
VersionInfo string
DeprecationLink string
}
// DeprecationField holds information about deprecation
@@ -37,11 +38,12 @@ type DeprecationField struct {
// EnvVar holds information about one envvar
type EnvVar struct {
Name string
DefaultValue string
Type string
Description string
Services []string
Name string
IntroductionVersion string
DefaultValue string
Type string
Description string
Services []string
}
type templateData struct {
@@ -103,6 +105,7 @@ func main() {
} else {
all[e] = EnvVar{
Name: e,
IntroductionVersion: f.IntroductionVersion,
Description: f.Description,
Type: f.Type,
DefaultValue: f.DefaultValue,
@@ -153,7 +156,7 @@ func main() {
"Description": env.Description,
"DefaultValue": env.DefaultValue,
"Type": env.Type,
})
})
}
}
@@ -198,6 +201,7 @@ func GetAnnotatedVariables(s interface{}, timestamp string) ([]ConfigField, []De
if !ok {
continue
}
introductionVersion, _ := field.Tag.Lookup("introductionVersion")
deprecationVersion, _ := field.Tag.Lookup("deprecationVersion")
removalVersion, _ := field.Tag.Lookup("removalVersion")
deprecationInfo, _ := field.Tag.Lookup("deprecationInfo")
@@ -223,6 +227,7 @@ func GetAnnotatedVariables(s interface{}, timestamp string) ([]ConfigField, []De
fields = append(fields,
ConfigField{
EnvVars: td,
IntroductionVersion: introductionVersion,
DefaultValue: v,
Description: desc,
Type: typeName,