Ejemplo n.º 1
0
func wrapUpAlbum(album *model.Album, artist *model.Artist, category *model.Category) {
	album.Category = category.Name
	if artist != nil {
		album.Artist = artist.Name
		artist.Albums = append(artist.Albums, album)
	} else { // bare album, no artist
		category.Albums = append(category.Albums, album)
	}
}
Ejemplo n.º 2
0
func wrapUpArtist(artist *model.Artist, category *model.Category) {
	category.Artists = append(category.Artists, artist)
}