(md *moduleDef, fn *modFunction)
| 273 | } |
| 274 | |
| 275 | func (h *shellCallHandler) FunctionFullUseLine(md *moduleDef, fn *modFunction) string { |
| 276 | usage := h.FunctionUseLine(md, fn) |
| 277 | opts := fn.OptionalArgs() |
| 278 | |
| 279 | if len(opts) > 0 { |
| 280 | sb := new(strings.Builder) |
| 281 | |
| 282 | for _, arg := range opts { |
| 283 | sb.WriteString(" [--") |
| 284 | sb.WriteString(arg.flagName) |
| 285 | |
| 286 | t := arg.TypeDef.String() |
| 287 | if t != "bool" { |
| 288 | sb.WriteString(" ") |
| 289 | sb.WriteString(t) |
| 290 | } |
| 291 | |
| 292 | sb.WriteString("]") |
| 293 | } |
| 294 | |
| 295 | return strings.ReplaceAll(usage, " [options]", sb.String()) |
| 296 | } |
| 297 | |
| 298 | return usage |
| 299 | } |
| 300 | |
| 301 | func (h *shellCallHandler) ModuleDoc(m *moduleDef) string { |
| 302 | var doc ShellDoc |
no test coverage detected