diff --git a/main.go b/main.go index adc6bd5..0c119f8 100644 --- a/main.go +++ b/main.go @@ -75,20 +75,25 @@ func parseCommand(targetCmd *cobra.Command, yamlPath string) { _, err := os.Stat(executablePath) if err != nil { - fmt.Fprintf(os.Stderr, "could not find matching executable for %s; skipping...", yamlPath) + fmt.Fprintf(os.Stderr, "could not find matching executable for %s; skipping...\n", yamlPath) return } yamlBytes, err := ioutil.ReadFile(yamlPath) if err != nil { - fmt.Fprintf(os.Stderr, "could not read %s; skipping...", yamlPath) + fmt.Fprintf(os.Stderr, "could not read %s; skipping...\n", yamlPath) return } doc := commandDoc{} err = yaml.Unmarshal(yamlBytes, &doc) if err != nil { - fmt.Fprintf(os.Stderr, "could not parse %s; skipping...", yamlPath) + fmt.Fprintf(os.Stderr, "could not parse %s; skipping...\n", yamlPath) + return + } + + if doc.Maintainer == "" { + fmt.Fprintf(os.Stderr, "%s is missing maintainer field; skipping...\n", yamlPath) return } @@ -104,6 +109,8 @@ func parseCommand(targetCmd *cobra.Command, yamlPath string) { parsedCmd.Long = doc.LongDesc } + parsedCmd.Long += fmt.Sprintf("\nMaintained by %s; reach out to them via mail or chat with questions", doc.Maintainer) + if doc.Examples != "" { parsedCmd.Example = doc.Examples }