Generate config docs from sample config #684

Merged
konrad merged 8 commits from feature/config-docs-generate into master 2020-10-17 08:07:40 +00:00
Showing only changes of commit ced8f7d063 - Show all commits

View File

@ -743,13 +743,13 @@ type configOption struct {
func parseYamlConfigNode(node *yaml.Node) (config *configOption) { func parseYamlConfigNode(node *yaml.Node) (config *configOption) {
config = &configOption{ config = &configOption{
key: node.Value, key: node.Value,
description: node.HeadComment, description: strings.ReplaceAll(node.HeadComment, "# ", ""),
} }
for i, n2 := range node.Content { for i, n2 := range node.Content {
coo := &configOption{ coo := &configOption{
key: n2.Value, key: n2.Value,
description: n2.HeadComment, description: strings.ReplaceAll(n2.HeadComment, "# ", ""),
} }
if i%2 == 0 { if i%2 == 0 {