func (o Objects) Add(prefix string, set Objects) {
	for k, v := range set {
		o[filepath.Join(prefix, k)] = v
	}
}
Add appends a jsonnet object to an object
package render
import (
	"path"
	"path/filepath"
	"strings"
	j "github.com/jsonnet-libs/k8s/pkg/builder"
	d "github.com/jsonnet-libs/k8s/pkg/builder/docsonnet"
	"github.com/jsonnet-libs/k8s/pkg/model"
)
const (
	ExtPrefix    = "extensions"
	CustomPrefix = "_custom"
	GenPrefix    = "_gen"
	GenExt       = ".libsonnet"
	IndexFile    = "gen" + GenExt
	MainFile     = "main" + GenExt
)
func Index(groups map[string]model.Group, name, repo, dir, description string) j.ObjectType {
	fields := []j.Type{
		d.Import(),
		d.Pkg(name, path.Join(repo, dir, "main.libsonnet"), description),
	}
	for name := range groups {
		imp := filepath.Join(GenPrefix, name, MainFile)
		fields = append(fields, j.Hidden(j.Import(name, imp)))
	}
	SortFields(fields)
	return j.Object("", fields...)
}
func Main(adds []string) j.Type {
	index := j.Import("", IndexFile)
	if len(adds) == 0 {
		return index
	}
	elems := []j.Type{index}
	for _, a := range adds {
		a = filepath.Join(CustomPrefix, filepath.Base(a))
		add := j.Import("", a)
		elems = append(elems, add)
	}
	return j.Add("", elems...)
}
type Objects map[string]j.ObjectType