INNER CODE UNIT · Go

assertOpkg

platform-engineering-labs/formae · cmd/bundle-examples/main.go:464

func assertOpkg(opkgArg, manifestPath string) error {
	mb, err := os.ReadFile(manifestPath)
	if err != nil {
		return fmt.Errorf("read manifest %s: %w", manifestPath, err)
	}
	var m Manifest
	if err := json.Unmarshal(mb, &m); err != nil {
		return fmt.Errorf("parse manifest %s: %w", manifestPath, err)
	}
	opkg, err := resolveOpkg(opkgArg)
	if err != nil {
		return err
	}
	out, err := exec.Command("ops", "opkg", "contents", opkg).Output()
	if err != nil {
		return fmt.Errorf("ops opkg contents %s: %w", opkg, err)
	}
	// The expected set is the checked-in policy, recorded in the manifest as the

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…