diff --git a/.env.example b/.env.example index a89fccb..54d5281 100644 --- a/.env.example +++ b/.env.example @@ -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. diff --git a/gen/gen_env.go b/gen/gen_env.go index a16fdad..d1a9b23 100644 --- a/gen/gen_env.go +++ b/gen/gen_env.go @@ -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 := "" diff --git a/gen/gen_md.go b/gen/gen_md.go index 1e03f64..fa8025e 100644 --- a/gen/gen_md.go +++ b/gen/gen_md.go @@ -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("\n\n") buffer.WriteString("# Tinyauth configuration reference\n\n") buffer.WriteString("| Environment | Flag | Description | Default |\n") buffer.WriteString("| - | - | - | - |\n")