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

Function resolveRuntimeClient

internal/cmd/runtime.go:355–372  ·  view source on GitHub ↗
(runtime *app.Runtime, email string, override string)

Source from the content-addressed store, hash-verified

353}
354
355func resolveRuntimeClient(runtime *app.Runtime, email string, override string) (string, error) {
356 if err := configureRuntimeConfig(runtime); err != nil {
357 return "", err
358 }
359 cfg, err := runtime.Config.Read()
360 if err != nil {
361 return "", err
362 }
363
364 return config.ResolveClientForAccountWithCredentials(cfg, email, override, func(client string) (bool, error) {
365 if err := configureRuntimeLayout(runtime, config.PathKindConfig, config.PathKindData); err != nil {
366 return false, err
367 }
368 files := config.NewClientCredentialsStore(runtime.Layout)
369 _, exists, err := files.ExistingPath(client)
370 return exists, err
371 })
372}
373
374func commandIO(ctx context.Context) app.IO {
375 commandIO := newDefaultRuntime().IO

Calls 6

ExistingPathMethod · 0.95
configureRuntimeConfigFunction · 0.85
configureRuntimeLayoutFunction · 0.85
ReadMethod · 0.45