(dockerCLI command.Streams, name string)
| 108 | } |
| 109 | |
| 110 | func acceptPrivileges(dockerCLI command.Streams, name string) func(ctx context.Context, privileges plugin.Privileges) (bool, error) { |
| 111 | return func(ctx context.Context, privileges plugin.Privileges) (bool, error) { |
| 112 | _, _ = fmt.Fprintf(dockerCLI.Out(), "Plugin %q is requesting the following privileges:\n", name) |
| 113 | for _, privilege := range privileges { |
| 114 | _, _ = fmt.Fprintf(dockerCLI.Out(), " - %s: %v\n", privilege.Name, privilege.Value) |
| 115 | } |
| 116 | return prompt.Confirm(ctx, dockerCLI.In(), dockerCLI.Out(), "Do you grant the above permissions?") |
| 117 | } |
| 118 | } |
no test coverage detected
searching dependent graphs…