mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2026-02-25 02:11:56 +00:00
fix: auto gen warning on example env and use correct cli flag in md gen
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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 := ""
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user