func MarshalText(w io.Writer, m *Manifest) error { var bm pb.Manifest for _, resource := range m.Resources { bm.Resource = append(bm.Resource, toProto(resource)) } return proto.MarshalText(w, &bm) }
func Marshal(m *Manifest) ([]byte, error) { var bm pb.Manifest for _, resource := range m.Resources { bm.Resource = append(bm.Resource, toProto(resource)) } return proto.Marshal(&bm) }