MCPcopy Index your code
hub / github.com/devspace-sh/devspace / parseImages

Function parseImages

cmd/init.go:904–926  ·  view source on GitHub ↗
(manifests string)

Source from the content-addressed store, hash-verified

902}
903
904func 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}

Callers 2

initDevspaceMethod · 0.85
TestParseImagesFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestParseImagesFunction · 0.68