mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2026-02-27 11:21:59 +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
|
# Tinyauth example configuration
|
||||||
|
|
||||||
# The base URL where the app is hosted.
|
# The base URL where the app is hosted.
|
||||||
|
|||||||
@@ -106,6 +106,8 @@ func buildEnvChildPath(parent string, child string) string {
|
|||||||
|
|
||||||
func compileEnv(entries []EnvEntry) []byte {
|
func compileEnv(entries []EnvEntry) []byte {
|
||||||
buffer := bytes.Buffer{}
|
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")
|
buffer.WriteString("# Tinyauth example configuration\n\n")
|
||||||
|
|
||||||
previousSection := ""
|
previousSection := ""
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ func buildMdEntry(child reflect.StructField, childValue reflect.Value, parentPat
|
|||||||
|
|
||||||
entry := MarkdownEntry{
|
entry := MarkdownEntry{
|
||||||
Env: strings.ToUpper(strings.ReplaceAll(parentPath, ".", "_")) + strings.ToUpper(child.Name),
|
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,
|
Description: desc,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,6 +104,7 @@ func buildMdChildPath(parent string, child string) string {
|
|||||||
func compileMd(entries []MarkdownEntry) []byte {
|
func compileMd(entries []MarkdownEntry) []byte {
|
||||||
buffer := bytes.Buffer{}
|
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("# Tinyauth configuration reference\n\n")
|
||||||
buffer.WriteString("| Environment | Flag | Description | Default |\n")
|
buffer.WriteString("| Environment | Flag | Description | Default |\n")
|
||||||
buffer.WriteString("| - | - | - | - |\n")
|
buffer.WriteString("| - | - | - | - |\n")
|
||||||
|
|||||||
Reference in New Issue
Block a user