MCPcopy Create free account
hub / github.com/anchordotdev/cli / runTUI

Method runTUI

lcl/bootstrap.go:46–78  ·  view source on GitHub ↗
(ctx context.Context, drv *ui.Driver)

Source from the content-addressed store, hash-verified

44}
45
46func (c Bootstrap) runTUI(ctx context.Context, drv *ui.Driver) error {
47 if cli.CalledAsFromContext(ctx) == "config" {
48 drv.Activate(ctx, ui.Section{
49 Name: "LclConfigDeprecation",
50 Model: ui.MessageLines{
51 ui.Warning(fmt.Sprintf("%s is deprecated, use %s",
52 ui.Whisper("`anchor lcl config`"),
53 ui.Whisper("`anchor lcl bootstrap`"),
54 )),
55 },
56 })
57 }
58
59 var err error
60 cmd := &auth.Client{
61 Anc: c.anc,
62 Source: "lclhost",
63 }
64 c.anc, err = cmd.Perform(ctx, drv)
65 if err != nil {
66 return err
67 }
68
69 drv.Activate(ctx, models.BootstrapHeader)
70 drv.Activate(ctx, models.BootstrapHint)
71
72 err = c.perform(ctx, drv)
73 if err != nil {
74 return err
75 }
76
77 return nil
78}
79
80func (c Bootstrap) perform(ctx context.Context, drv *ui.Driver) error {
81 cfg := cli.ConfigFromContext(ctx)

Callers

nothing calls this directly

Calls 4

PerformMethod · 0.95
performMethod · 0.95
CalledAsFromContextFunction · 0.92
ActivateMethod · 0.80

Tested by

no test coverage detected