isUnderlineHeader checks if a line is an underline-style header (--- or ===).
(line string)
| 149 | |
| 150 | // isUnderlineHeader checks if a line is an underline-style header (--- or ===). |
| 151 | func isUnderlineHeader(line string) bool { |
| 152 | return regexp.MustCompile(`^[-=]+$`).MatchString(line) |
| 153 | } |
| 154 | |
| 155 | // isPluginCommand checks if a command is from a plugin by looking for the plugin signature in the Long description |
| 156 | func isPluginCommand(cmd *cobra.Command) bool { |