MCPcopy Index your code
hub / github.com/dagger/dagger / FunctionFullUseLine

Method FunctionFullUseLine

cmd/dagger/shell_help.go:275–299  ·  view source on GitHub ↗
(md *moduleDef, fn *modFunction)

Source from the content-addressed store, hash-verified

273}
274
275func (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
301func (h *shellCallHandler) ModuleDoc(m *moduleDef) string {
302 var doc ShellDoc

Callers 1

parseArgumentValuesMethod · 0.95

Calls 3

FunctionUseLineMethod · 0.95
OptionalArgsMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected