(conf types.FileObjectConfig)
| 207 | } |
| 208 | |
| 209 | func loadFileObject(conf types.FileObjectConfig) (types.FileObjectConfig, error) { |
| 210 | if !conf.External { |
| 211 | switch { |
| 212 | case conf.Environment != "": |
| 213 | conf.Content = os.Getenv(conf.Environment) |
| 214 | case conf.File != "": |
| 215 | bytes, err := os.ReadFile(conf.File) |
| 216 | if err != nil { |
| 217 | return conf, err |
| 218 | } |
| 219 | conf.Content = string(bytes) |
| 220 | } |
| 221 | } |
| 222 | return conf, nil |
| 223 | } |
| 224 | |
| 225 | func inspectWithPull(ctx context.Context, dockerCli command.Cli, imageName string) (image.InspectResponse, error) { |
| 226 | inspect, err := dockerCli.Client().ImageInspect(ctx, imageName) |
no test coverage detected