(imageName string)
| 126 | } |
| 127 | |
| 128 | func (c Client) GetImageIDByName(imageName string) (string, error) { |
| 129 | filter := filters.NewArgs() |
| 130 | filter.Add("reference", imageName) |
| 131 | list, err := c.cli.ImageList(context.Background(), image.ListOptions{ |
| 132 | Filters: filter, |
| 133 | }) |
| 134 | if err != nil { |
| 135 | return "", err |
| 136 | } |
| 137 | if len(list) > 0 { |
| 138 | return list[0].ID, nil |
| 139 | } |
| 140 | return "", nil |
| 141 | } |
| 142 | |
| 143 | func (c Client) NetworkExist(name string) bool { |
| 144 | var options network.ListOptions |
no outgoing calls
no test coverage detected