fix: remove omitempty suffix from docs gen

This commit is contained in:
Stavros
2026-07-11 17:18:23 +03:00
parent 4cd4d67bda
commit 791adbb54d
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -51,6 +51,8 @@ func buildEnvEntry(child reflect.StructField, childValue reflect.Value, parentPa
return return
} }
tag = strings.TrimSuffix(tag, ",omitempty")
value := childValue.Interface() value := childValue.Interface()
entry := EnvEntry{ entry := EnvEntry{
+4
View File
@@ -52,6 +52,8 @@ func buildMdEntry(child reflect.StructField, childValue reflect.Value, parentPat
return return
} }
tag = strings.TrimSuffix(tag, ",omitempty")
value := childValue.Interface() value := childValue.Interface()
entry := MarkdownEntry{ entry := MarkdownEntry{
@@ -88,6 +90,8 @@ func buildMdMapEntry(child reflect.StructField, parentPath string, entries *[]Ma
return return
} }
tag = strings.TrimSuffix(tag, ",omitempty")
mapPath := parentPath + tag + ".[name]." mapPath := parentPath + tag + ".[name]."
valueType := fieldType.Elem() valueType := fieldType.Elem()