Test to see if we have a reason to print See Also information in docs Basically this is a test for a parent command or a subcommand which is both not deprecated and not the autogenerated help command.
(cmd *cobra.Command)
| 24 | // Basically this is a test for a parent command or a subcommand which is |
| 25 | // both not deprecated and not the autogenerated help command. |
| 26 | func hasSeeAlso(cmd *cobra.Command) bool { |
| 27 | if cmd.HasParent() { |
| 28 | return true |
| 29 | } |
| 30 | for _, c := range cmd.Commands() { |
| 31 | if !c.IsAvailableCommand() || c.IsAdditionalHelpTopicCommand() { |
| 32 | continue |
| 33 | } |
| 34 | return true |
| 35 | } |
| 36 | return false |
| 37 | } |
| 38 | |
| 39 | // Temporary workaround for yaml lib generating incorrect yaml with long strings |
| 40 | // that do not contain \n. |
no test coverage detected