feat: replace text/template with templ and refactor code

This commit is contained in:
rramiachraf
2024-03-04 14:59:47 +01:00
parent 5390a2878d
commit e2d5ef044b
43 changed files with 836 additions and 851 deletions

28
data/search.go Normal file
View File

@ -0,0 +1,28 @@
package data
type SearchResponse struct {
Response struct {
Sections sections
}
}
type result struct {
ArtistNames string `json:"artist_names"`
Title string
Path string
Thumbnail string `json:"song_art_image_thumbnail_url"`
}
type hits []struct {
Result result
}
type sections []struct {
Type string
Hits hits
}
type SearchResults struct {
Query string
Sections sections
}