LookupImageByName returns the image for a given image name.
(name string)
| 151 | |
| 152 | // LookupImageByName returns the image for a given image name. |
| 153 | func LookupImageByName(name string) (*Image, error) { |
| 154 | for _, v := range innerMap { |
| 155 | if v.Image == name { |
| 156 | return v, nil |
| 157 | } |
| 158 | } |
| 159 | return nil, fmt.Errorf("Map does not contain image with name %s", name) |
| 160 | } |
| 161 | |
| 162 | // LookupImageByOverride takes an image that has been specified by the user |
| 163 | // to use instead of the one in the extension map. This function returns a |