MCPcopy Index your code
hub / github.com/containerd/containerd / passwordPrompt

Function passwordPrompt

cmd/ctr/commands/resolver.go:42–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40var PushTracker = docker.NewInMemoryTracker()
41
42func passwordPrompt() (string, error) {
43 c := console.Current()
44 defer c.Reset()
45
46 if err := c.DisableEcho(); err != nil {
47 return "", fmt.Errorf("failed to disable echo: %w", err)
48 }
49
50 line, _, err := bufio.NewReader(c).ReadLine()
51 if err != nil {
52 return "", fmt.Errorf("failed to read line: %w", err)
53 }
54 return string(line), nil
55}
56
57// GetResolver prepares the resolver from the environment and options
58func GetResolver(ctx context.Context, cliContext *cli.Context) (remotes.Resolver, error) {

Callers 2

GetResolverFunction · 0.85
NewStaticCredentialsFunction · 0.85

Calls 1

ResetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…