NewDryRunClient produces a DryRunClient
(apiClient client.APIClient, cli command.Cli)
| 65 | |
| 66 | // NewDryRunClient produces a DryRunClient |
| 67 | func NewDryRunClient(apiClient client.APIClient, cli command.Cli) (*DryRunClient, error) { |
| 68 | b, err := builder.New(cli, builder.WithSkippedValidation()) |
| 69 | if err != nil { |
| 70 | return nil, err |
| 71 | } |
| 72 | configFile, err := b.ImageOpt() |
| 73 | if err != nil { |
| 74 | return nil, err |
| 75 | } |
| 76 | return &DryRunClient{ |
| 77 | apiClient: apiClient, |
| 78 | containers: []containerType.Summary{}, |
| 79 | execs: sync.Map{}, |
| 80 | resolver: imagetools.New(configFile), |
| 81 | }, nil |
| 82 | } |
| 83 | |
| 84 | func getCallingFunction() string { |
| 85 | pc, _, _, _ := runtime.Caller(2) |