Add output to configenvextractor
This commit is contained in:
@@ -22,6 +22,7 @@ type ConfigField struct {
|
||||
}
|
||||
|
||||
func main() {
|
||||
fmt.Println("Generating documentation for environment variables:")
|
||||
content, err := ioutil.ReadFile("../../../docs/templates/CONFIGURATION.tmpl")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
@@ -44,6 +45,7 @@ m := map[string]interface{}{
|
||||
for pkg, conf := range m {
|
||||
fields = GetAnnotatedVariables(conf)
|
||||
if len(fields) > 0 {
|
||||
fmt.Printf("... %s\n", pkg)
|
||||
targetFile, err = os.Create(filepath.Join(targetFolder, replacer.Replace(pkg) + "_configvars.md"))
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to create target file: %s", err)
|
||||
@@ -54,6 +56,7 @@ m := map[string]interface{}{
|
||||
}
|
||||
}
|
||||
}
|
||||
fmt.Println("done")
|
||||
}
|
||||
|
||||
func GetAnnotatedVariables(s interface{}) []ConfigField {
|
||||
|
||||
Reference in New Issue
Block a user