// Package gate holds the delivery gate's own manifest, so its code takes from the manifest's declarations what it hears, // never another module's name written in code. package gate import ( _ "embed" "encoding/json" "fmt" ) //go:embed module.json var manifest []byte // Consumes is what the gate's manifest consumes, in its order. func Consumes() ([]string, error) { var m struct { Consumes []string `json:"consumes"` } if err := json.Unmarshal(manifest, &m); err != nil { return nil, fmt.Errorf("the gate's own manifest is not readable: %w", err) } return m.Consumes, nil }