Compare commits

..

1 Commits

Author SHA1 Message Date
Stavros
699d8d173f fix: auto gen warning on example env and use correct cli flag in md gen 2026-02-24 16:11:25 +02:00
3 changed files with 6 additions and 1 deletions

View File

@@ -1,3 +1,5 @@
# This file is automatically generated by gen/gen_env.go. Do not edit manually.
# Tinyauth example configuration
# The base URL where the app is hosted.

View File

@@ -106,6 +106,8 @@ func buildEnvChildPath(parent string, child string) string {
func compileEnv(entries []EnvEntry) []byte {
buffer := bytes.Buffer{}
buffer.WriteString("# This file is automatically generated by gen/gen_env.go. Do not edit manually.\n\n")
buffer.WriteString("# Tinyauth example configuration\n\n")
previousSection := ""

View File

@@ -56,7 +56,7 @@ func buildMdEntry(child reflect.StructField, childValue reflect.Value, parentPat
entry := MarkdownEntry{
Env: strings.ToUpper(strings.ReplaceAll(parentPath, ".", "_")) + strings.ToUpper(child.Name),
Flag: fmt.Sprintf("--%s%s", strings.TrimPrefix(parentPath, "tinyauth."), tag),
Flag: fmt.Sprintf("--%s%s", strings.TrimPrefix(parentPath, "tinyauth."), strings.ToLower(child.Name)),
Description: desc,
}
@@ -104,6 +104,7 @@ func buildMdChildPath(parent string, child string) string {
func compileMd(entries []MarkdownEntry) []byte {
buffer := bytes.Buffer{}
buffer.WriteString("<!--- This file is automatically generated by gen/gen_md.go. Do not edit manually. --->\n\n")
buffer.WriteString("# Tinyauth configuration reference\n\n")
buffer.WriteString("| Environment | Flag | Description | Default |\n")
buffer.WriteString("| - | - | - | - |\n")