MCPcopy Create free account
hub / github.com/openclaw/gogcli / helpDescription

Function helpDescription

internal/cmd/root.go:509–528  ·  view source on GitHub ↗
(runtime *app.Runtime)

Source from the content-addressed store, hash-verified

507}
508
509func helpDescription(runtime *app.Runtime) string {
510 desc := baseDescription()
511
512 configLine := "unknown"
513 if err := configureRuntimeConfig(runtime); err != nil {
514 configLine = fmt.Sprintf("error: %v", err)
515 } else if runtime.Config.Path() != "" {
516 configLine = runtime.Config.Path()
517 }
518
519 backendInfo, err := runtimeKeyringBackendInfo(runtime)
520 var backendLine string
521 if err != nil {
522 backendLine = fmt.Sprintf("error: %v", err)
523 } else if backendInfo.Value != "" {
524 backendLine = fmt.Sprintf("%s (source: %s)", backendInfo.Value, backendInfo.Source)
525 }
526
527 return fmt.Sprintf("%s\n\nConfig:\n file: %s\n keyring backend: %s", desc, configLine, backendLine)
528}
529
530// newUsageError wraps errors in a way main() can map to exit code 2.
531func newUsageError(err error) error {

Callers 2

executeWithRuntimeFunction · 0.85
TestHelpDescriptionFunction · 0.85

Calls 4

baseDescriptionFunction · 0.85
configureRuntimeConfigFunction · 0.85
PathMethod · 0.45

Tested by 1

TestHelpDescriptionFunction · 0.68