home to your local SPACEGIRL 馃挮
arimelody.space
760 B
33 lines
1package music
2
3import (
4 "fmt"
5 "time"
6)
7
8func make_date_work(date string) time.Time {
9 res, err := time.Parse("2-Jan-2006", date)
10 if err != nil {
11 fmt.Printf("somehow we failed to parse %s! falling back to epoch :]\n", date)
12 return time.Unix(0, 0)
13 }
14 return res
15}
16
17func GetRelease(id string) (MusicRelease, bool) {
18 for _, album := range placeholders {
19 if album.Id == id {
20 return album, true
21 }
22 }
23 return MusicRelease{}, false
24}
25
26func QueryAllMusic() ([]MusicRelease) {
27 return placeholders
28}
29
30func QueryAllArtists() ([]Artist) {
31 return []Artist{ ari, mellodoot, zaire, mae, loudar, red }
32}
33