func createNameBlobMap()

in cli/mfg_cmds.go [110:128]


func createNameBlobMap(binDir string,
	areas []flash.FlashArea) (imfg.NameBlobMap, error) {

	mm := imfg.NameBlobMap{}

	for _, area := range areas {
		filename := fmt.Sprintf("%s/%s.bin", binDir, area.Name)
		bin, err := readMfgBin(filename)
		if err != nil {
			if !os.IsNotExist(errors.Cause(err)) {
				return nil, errors.Wrapf(err, "could not read mfgimage binary")
			}
		} else {
			mm[area.Name] = bin
		}
	}

	return mm, nil
}