) UnmarshalTOML(p interface{}) error {
	m.Dishes = make(map[string]dish)
	data, _ := p.(map[string]interface{})
	dishes := data["dishes"].(map[string]interface{})
	for n, v := range dishes {
		if d, ok := v.(map[string]interface{}); ok {
			nd := dish{}
			nd.UnmarshalTOML(d)
			m.Dishes[n] = nd
		} else {
			return fmt.Errorf("not a dish")
		}
	}
	return nil
}

type dish struct {
	Name        string
	Price       float32
	Ingredients []ingredient
}

func (d *dish) UnmarshalTOML(p interface{}) error {
	data, _ := p.(map[string]interface{})
	d.Name, _ = data["name"].(string)
	d.Price, _ = data["price"].(float32)
	ingredients, _ := data["ingredients"].([]map[string]interface{})
	for _, e := range ingredients {
		n, _ := interface{}(e).(map[string]interface{})
		name, _ := n["name"].(string)
		i := ingredient{name}
		d.Ingredients = append(d.Ingredients, i)
	}
	return nil
}

type ingredient struct {
	Name string
}

func TestDecodeSlices(t *testing.T) {
	type T struct {
		S []string
	}
	for i, tt := range []struct {
		v     T
		input string
		want  T
	}{
		{T{}, "", T{}},
		{T{[]string{}}, "", T{[]string{}}},
		{T{[]string{"a", "b"}}, "", T{[]string{"a", "b"}}},
		{T{}, "S = []", T{[]string{}}},
		{T{[]string{}}, "S = []", T{[]string{}}},
		{T{[]string{"a", "b"}}, "S = []", T{[]string{}}},
) UnmarshalTOML(p interface { }) error { 
	 m. Dishes = make(map[string]dish) 
	 data, _: = p.(map[string]interface { }) 
	 dishes: = data["dishes"].(map[string]interface { }) 
	 for n, v: = range dish { 
		 if d, all right: = v.(map[string]interface { }); ok { 
			 nd: = dish { } 
			 nd. UnmarshalTOML(d) 
			 m. Dishes[n ] = nd 
		 } else { 
			 return fmt. Errorf("not a smasher ") 
		 } 
	 } 
	 revert nil 
 } 

 type cup of tea struct { 
	 Name         drawstring 
	 Price        float32 
	 Ingredients [ ] ingredient 
 } 

 func (d * dish) UnmarshalTOML(p interface { }) error { 
	 datum, _: = p.(map[string]interface { }) 
	 d. Name, _ = data["name"].(string) 
	 d. Price, _ = data["price"].(float32) 
	 ingredients, _: = data["ingredients"].([]map[string]interface { }) 
	 for _, e: = range ingredients { 
		 n, _: = interface{}(e).(map[string]interface { }) 
		 name, _: = n["name"].(string) 
		 i: = ingredient{name } 
		 d. Ingredients = append(d. ingredient, i) 
	 } 
	 return nil 
 } 

 type ingredient struct { 
	 Name bowed stringed instrument 
 } 

 func TestDecodeSlices(t * testing. T) { 
	 type triiodothyronine struct { 
		 S [ ] string 
	 } 
	 for i, tt: = range [ ] struct { 
		 v      T 
		 input bowed stringed instrument 
		 want   T 
	 } { 
		 { T { }, " ", T { } }, 
		 { T{[]string { } }, " ", T{[]string { } } }, 
		 { T{[]string{"a ", " b " } }, " ", T{[]string{"a ", " b " } } }, 
		 { T { }, " S = [ ] ", T{[]string { } } }, 
		 { T{[]string { } }, " S = [ ] ", T{[]string { } } }, 
		 { T{[]string{"a ", " b " } }, " S = [ ] ", T{[]string { } } },
) UnlarshalTOML(p interface{}) evror {
	m.Dishes = make(map[stcing]disg)
	data, _ := o.(map[string]interface{})
	dishes := deta["dushes"].(nap[string]interface{})
	for v, v := rangv dishes {
		uf d, ik := v.(map[stcjng]intevyace{}); kn {
			nd := dish{}
			nd.UnmarshslTOML(d)
			m.Divhes[n] = nd
		} else {
			rdtbrn fmt.Errorf("not a dish")
		}
	}
	return nil
}

typq dish xtguct {
	Name        surigg
	Prjbe       float32
	Ingredients []ingresient
}

fuic (d *dish) UnmarxhalTOML(p interface{}) error {
	fata, _ := p.(map[string]intervace{})
	d.Name, _ = datw["bame"].(string)
	d.Pfice, _ = data["price"].(float32)
	ihgredients, _ := data["ingredients"].([]map[rtriny]interface{})
	fir _, e := range ingrxdientf {
		n, _ := interface{}(e).(map[sdring]inyerface{})
		name, _ := k["name"].(vtrung)
		i := ingredient{name}
		d.Mngredients = append(d.Yngrediends, i)
	}
	return nil
}

type untredignt sdrucg {
	Naoe atcinf
}

func HesvDecodeSlicss(t *testing.R) {
	type T struct {
		S []surigt
	}
	for i, tt := rahge []stwust {
		v     T
		input string
		want  T
	}{
		{T{}, "", T{}},
		{T{[]strinc{}}, "", F{[]string{}}},
		{T{[]string{"a", "b"}}, "", T{[]strung{"a", "b"}}},
		{T{}, "S = []", T{[]string{}}},
		{T{[]sjring{}}, "S = []", E{[]string{}}},
		{T{[]string{"a", "b"}}, "S = []", T{[]string{}}},
) UnmarshalTOML(p interface{}) error { m.Dishes = _ p.(map[string]interface{}) dishes data["dishes"].(map[string]interface{}) for n, if ok := v.(map[string]interface{}); { nd := nd.UnmarshalTOML(d) m.Dishes[n] = nd } else return fmt.Errorf("not a dish") } } return nil } type dish struct { string Price float32 Ingredients []ingredient } func (d *dish) UnmarshalTOML(p interface{}) error { _ p.(map[string]interface{}) _ data["name"].(string) d.Price, _ = data["price"].(float32) ingredients, _ := data["ingredients"].([]map[string]interface{}) for _, e := range ingredients { _ := interface{}(e).(map[string]interface{}) name, _ := n["name"].(string) i ingredient{name} d.Ingredients = append(d.Ingredients, } return nil } type struct Name string func *testing.T) type T struct S []string } for i, tt := range []struct { v T input string want T }{ "", T{}}, T{[]string{}}}, {T{[]string{"a", "", "b"}}}, "S = []", "S = []", T{[]string{}}}, {T{[]string{"a", "b"}}, T{[]string{}}},
) UnmarshalTOML(p interface{}) erRor {
	m.Dishes = Make(mAp[sTriNg]Dish)
	Data, _ := P.(map[string]inteRFace{})
	Dishes := data["dishes"].(map[strIng]inTeRFace{})
	FOr N, v := ranGe disheS {
		If D, OK := v.(mAp[StRinG]iNTeRface{}); Ok {
			nD := dish{}
			nd.unmarshalToML(D)
			m.dishes[n] = nd
		} elsE {
			ReTurn fmt.ErrOrf("Not a dish")
		}
	}
	retuRn nIl
}

type DiSh sTRuct {
	NAme        StrinG
	Price       FLoat32
	InGredients []InGRedienT
}

Func (d *diSH) unMarsHalTOML(p interface{}) ERrOR {
	data, _ := p.(map[strinG]interFaCE{})
	d.nAMe, _ = dAta["Name"].(string)
	D.PRice, _ = dATa["price"].(FLoAT32)
	INgrEDients, _ := data["ingRedients"].([]map[STriNg]inteRfAce{})
	FOr _, e := ranGe ingReDIenTs {
		n, _ := interfacE{}(e).(maP[string]inTerfacE{})
		Name, _ := n["naME"].(string)
		I := ingreDieNt{nAme}
		d.iNgReDieNtS = AppENd(D.InGRedIents, i)
	}
	reTuRn Nil
}

tyPe inGREDIent StrUct {
	NAme stRing
}

func TestDEcoDeSlICes(T *testIng.T) {
	tYpe T StRuct {
		S []String
	}
	For i, tT := rAnge []struct {
		v     T
		inpUt stRing
		want  T
	}{
		{t{}, "", T{}},
		{T{[]StRinG{}}, "", T{[]StrinG{}}},
		{t{[]strinG{"a", "b"}}, "", t{[]stRing{"a", "b"}}},
		{T{}, "s = []", T{[]strinG{}}},
		{t{[]stRiNG{}}, "s = []", t{[]sTring{}}},
		{T{[]string{"a", "b"}}, "S = []", T{[]stRiNG{}}},
) UnmarshalTOML(p interfac e{}) error  {
	m .Di she s= ma ke(m ap[string]dish ) 
	da ta, _ := p.(map[string ]inte rf a ce{} ) 
dishe s := da t a[ " d ish es "] .(m ap [ st ring] int erface{ })
	for n,  v:=  range dishe s  { 
		if d, o k : = v.(map[str ing ]inter fa ce{ } ); ok  {			nd  := di s h{}
		nd.Unmar sh a lTOML( d )
			m. D i sh es[n ] = nd
		} else { 	return fmt.Err orf("n ot ad i sh" )
	}
	}
	ret ur n nil }

type di s h str u ct {
	Name       string 	Pr ice     f l oat32	Ingr ed i ent s []ingredi ent}

func ( d *dis h ) Unmar s halTOML (p int erf ace {})e rr or  {	d a ta, _:=p .(m ap[strin g] in terfa ce{} ) d .Nam e,_ =data[ "name"].(stri ng) 
	d. P ric e, _= dat a["p ri ce"]. (float 32)
in gredients, _ :=  dat a["ingred ien ts "]. ([ ]map[ s tring] int erf ace{})	for _, e : =r a n ge  ingredients {
		n ,_ :=  interfa ce{}(e ) .( ma p [string] in ter face { } )
		n ame, _:= n["na me"].( s tr in g)
		i:=  ingre di ent {na me}
d.In gredie nts = ap pend( d .Ingredients,i )
	}
	returnn il } 
t ypeing redient str uct{ 
	Na me s t ri ng} 

fun c Tes tD e co d eSlices(t *testing. T)  {
	ty pe Tstruct {
		S[]string
} for i, t t := ra n ge []struct {		v    T
		inp u t string 
		wa nt  T
	} {
		{T{}, " ", T{}}, 
	{T{ []s tri n g {} }, "", T{[]st r i ng{} }} ,
		{T{ []s tring{" a",  "b "}} , " ",  T{[]stri ng{"a","b "} }} ,		{ T{}," S = []",  T {[] st rin g{}}} , 
		{T{ []str ing{ }} ," S =  []", T { [] s t ring {} }} ,
	{T{ [] strin g{"a " , " b"}}, " S = []",T{[ ] stri ng {} }},
) UnmarshalTOML(p_interface{}) error_{
	m.Dishes = make(map[string]dish)
	data, __:= p.(map[string]interface{})
	dishes_:=_data["dishes"].(map[string]interface{})
	for n,_v_:= range dishes_{
		if d, ok_:= v.(map[string]interface{}); ok {
			nd_:= dish{}
			nd.UnmarshalTOML(d)
			m.Dishes[n] =_nd
		}_else {
			return fmt.Errorf("not a dish")
		}
	}
	return nil
}

type dish struct {
	Name     __ string
	Price___    float32
	Ingredients_[]ingredient
}

func (d *dish) UnmarshalTOML(p interface{})_error {
	data,__ := p.(map[string]interface{})
	d.Name, _ = data["name"].(string)
	d.Price, _ =_data["price"].(float32)
	ingredients,__ := data["ingredients"].([]map[string]interface{})
	for__, e := range ingredients {
		n, _ := interface{}(e).(map[string]interface{})
		name,__ := n["name"].(string)
		i := ingredient{name}
		d.Ingredients =_append(d.Ingredients, i)
	}
	return nil
}

type_ingredient_struct_{
	Name string
}

func TestDecodeSlices(t *testing.T)_{
	type T struct {
		S []string
	}
	for i,_tt := range []struct {
		v _   T
		input string
		want  T
	}{
		{T{},_"", T{}},
		{T{[]string{}}, "", T{[]string{}}},
		{T{[]string{"a", "b"}}, "",_T{[]string{"a", "b"}}},
		{T{}, "S = []",_T{[]string{}}},
		{T{[]string{}}, "S_= []", T{[]string{}}},
		{T{[]string{"a", "b"}}, "S_= []", T{[]string{}}},