(flag sharedaction.CommandFlag)
| 80 | } |
| 81 | |
| 82 | func FlagWithHyphens(flag sharedaction.CommandFlag) string { |
| 83 | switch { |
| 84 | case flag.Short != "" && flag.Long != "": |
| 85 | return fmt.Sprintf("--%s, -%s", flag.Long, flag.Short) |
| 86 | case flag.Short != "": |
| 87 | return "-" + flag.Short |
| 88 | default: |
| 89 | return "--" + flag.Long |
| 90 | } |
| 91 | } |
no outgoing calls
no test coverage detected