mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-02 00:17:49 +01:00
Using slices for Results, instead of pointers of slices
This commit is contained in:
parent
1da0f7d412
commit
cac352b18c
2 changed files with 15 additions and 15 deletions
|
|
@ -40,16 +40,16 @@ func (c *SearchingController) Search2() {
|
|||
|
||||
response := c.NewEmpty()
|
||||
searchResult2 := &responses.SearchResult2{}
|
||||
searchResult2.Artist = make([]responses.Artist, len(*as))
|
||||
for i, e := range *as {
|
||||
searchResult2.Artist = make([]responses.Artist, len(as))
|
||||
for i, e := range as {
|
||||
searchResult2.Artist[i] = responses.Artist{Id: e.Id, Name: e.Title}
|
||||
}
|
||||
searchResult2.Album = make([]responses.Child, len(*als))
|
||||
for i, e := range *als {
|
||||
searchResult2.Album = make([]responses.Child, len(als))
|
||||
for i, e := range als {
|
||||
searchResult2.Album[i] = c.ToChild(e)
|
||||
}
|
||||
searchResult2.Song = make([]responses.Child, len(*mfs))
|
||||
for i, e := range *mfs {
|
||||
searchResult2.Song = make([]responses.Child, len(mfs))
|
||||
for i, e := range mfs {
|
||||
searchResult2.Song[i] = c.ToChild(e)
|
||||
}
|
||||
response.SearchResult2 = searchResult2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue