func (e Embedded) Add(rel Relation, r *Resource) {
	n := e[rel]
	if n == nil {
		e[rel] = r
		return
	}
	if nec, ok := n.([]*Resource); ok {
		e[rel] = append(nec, r)
		return
	}
	if nee, ok := n.(*Resource); ok {
		e[rel] = append([]*Resource{nee}, r)
		return
	}
	e[rel] = []*Resource{r}
}
Add appends the resource into the list of embedded
resources with the specified relation.
r should be a Resource
package hal
import (
	"encoding/json"
	"reflect"
	"strings"
)
type (
	Entry map[string]interface{}
	Mapper interface {
		GetMap() Entry
	}
	Relation string
	CurieHandle struct {
		Name string
		*Resource
	}
	LinkAttr       map[string]interface{}
	Link           LinkAttr
	LinkCollection []Link
	LinkRelations  map[Relation]interface{}
	Resource struct {
		Payload  interface{}
		Links    LinkRelations
		Embedded Embedded
		Curies   map[string]*CurieHandle
	}
	ResourceCollection []*Resource
	Embedded map[Relation]interface{}
)
func (c CurieHandle) AddNewLink(rel Relation, href string) {
	rel = Relation(c.Name) + ":" + rel
	c.Resource.AddLink(rel, NewLink(href, nil))
}
func (e Embedded) AddCollection(rel Relation, r ResourceCollection) {
	n := e[rel]
	if n == nil {
		e[rel] = r
		return
	}
	if nc, ok := n.([]*Resource); ok {
		e[rel] = append(nc, r...)
		return
	}
	if nr, ok := n.(*Resource); ok {
		e[rel] = append([]*Resource{nr}, r...)
	}
}