(manifests string)
| 902 | } |
| 903 | |
| 904 | func parseImages(manifests string) ([]string, error) { |
| 905 | images := []string{} |
| 906 | |
| 907 | var doc yaml.Node |
| 908 | dec := yaml.NewDecoder(bytes.NewReader([]byte(manifests))) |
| 909 | for dec.Decode(&doc) == nil { |
| 910 | path, err := yamlpath.NewPath("..image") |
| 911 | if err != nil { |
| 912 | return nil, err |
| 913 | } |
| 914 | |
| 915 | matches, err := path.Find(&doc) |
| 916 | if err != nil { |
| 917 | return nil, err |
| 918 | } |
| 919 | |
| 920 | for _, match := range matches { |
| 921 | images = append(images, match.Value) |
| 922 | } |
| 923 | } |
| 924 | |
| 925 | return images, nil |
| 926 | } |
no outgoing calls