use comments of variables for help

This commit is contained in:
Christian Goll
2025-10-14 14:54:39 +02:00
committed by Jonathon Anderson
parent facde98fb5
commit 68758e3e45
7 changed files with 183 additions and 87 deletions

View File

@@ -47,7 +47,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
defer os.Remove(tempFile.Name())
if !NoHeader {
yamlTemplate := node.UnmarshalConf(node.Node{}, nil)
yamlTemplate := node.ConfToYaml(node.Node{}, nil)
if _, err := tempFile.WriteString("#nodename:\n# " + strings.Join(yamlTemplate, "\n# ") + "\n"); err != nil {
return err
}