From e3043a7e7b2be1b13b78175ac34a260ad2abe7e2 Mon Sep 17 00:00:00 2001 From: Christian Richter Date: Tue, 29 Nov 2022 10:49:09 +0100 Subject: [PATCH] Incorporate Requested Changes Signed-off-by: Christian Richter --- docs/helpers/adoc-generator.go.tmpl | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/docs/helpers/adoc-generator.go.tmpl b/docs/helpers/adoc-generator.go.tmpl index 2bc94b3a55..4cbdced667 100644 --- a/docs/helpers/adoc-generator.go.tmpl +++ b/docs/helpers/adoc-generator.go.tmpl @@ -107,22 +107,10 @@ func GetAnnotatedVariables(s interface{}) ([]ConfigField, []DeprecationField) { if !ok { continue } - deprecationVersion, ok := field.Tag.Lookup("deprecationVersion") - if !ok { - deprecationVersion = "" - } - removalVersion, ok := field.Tag.Lookup("removalVersion") - if !ok { - removalVersion = "" - } - deprecationInfo, ok := field.Tag.Lookup("deprecationInfo") - if !ok { - deprecationInfo = "" - } - deprecationReplacement, ok := field.Tag.Lookup("deprecationReplacement") - if !ok { - deprecationReplacement = "" - } + deprecationVersion, _ := field.Tag.Lookup("deprecationVersion") + removalVersion, _ := field.Tag.Lookup("removalVersion") + deprecationInfo, _ := field.Tag.Lookup("deprecationInfo") + deprecationReplacement, _ := field.Tag.Lookup("deprecationReplacement") if deprecationVersion != "" || removalVersion != "" || deprecationInfo != "" ||