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

Function shellTypeDoc

cmd/dagger/shell_help.go:428–454  ·  view source on GitHub ↗
(t *modTypeDef)

Source from the content-addressed store, hash-verified

426}
427
428func shellTypeDoc(t *modTypeDef) string {
429 var doc ShellDoc
430
431 fp := t.AsFunctionProvider()
432 if fp == nil {
433 doc.Add(t.KindDisplay(), t.Long())
434
435 // If not an object, only have the type to show.
436 return doc.String()
437 }
438
439 if fp.ProviderName() != "Query" {
440 doc.Add(t.KindDisplay(), t.Long())
441 }
442
443 if fns := fp.GetFunctions(); len(fns) > 0 {
444 doc.Add(
445 "Available Functions",
446 nameShortWrapped(fns, func(f *modFunction) (string, string) {
447 return f.CmdName(), f.Short()
448 }),
449 )
450 doc.Add("", `Use ".help <function>" for more information on a function.`)
451 }
452
453 return doc.String()
454}
455
456// isHiddenFunction returns true for internal functions that are callable
457// but should not clutter .help output: the synthetic "with" constructor

Callers 1

registerCommandsMethod · 0.85

Calls 10

AddMethod · 0.95
StringMethod · 0.95
nameShortWrappedFunction · 0.85
AsFunctionProviderMethod · 0.80
KindDisplayMethod · 0.80
CmdNameMethod · 0.80
ProviderNameMethod · 0.65
GetFunctionsMethod · 0.65
ShortMethod · 0.65
LongMethod · 0.45

Tested by

no test coverage detected