#musicbrainzdb
It's wrapper for work with MusicBrainz Database
- Golang (version 1.6 or above)
- pq
- Reform ORM
go get gopkg.in/reform.v1
- go get bitbucket.org/mellodycloud/mellody-musicbrainzdb.git
- import "bitbucket.org/mellodycloud/mellody-musicbrainzdb"
- Set Env variable CONNECTION_STRING to connect a DB.
export CONNECTION_STRING = postgres://<user>:<password>@<host>:5432/musicbrainz_db?sslmode=disable
var(
CONNECTION_STRING = os.Getenv("CONNECTION_STRING")
)
- Make context
context, _ := mellody_musicbrainzdb.NewDBContext(CONNECTION_STRING)
- Do query
artist, _ := context.Artist.Get("17db8438-f314-46ea-98e3-8a116c38d504")
fmt.Println(artist.Name)
More amount of examples you can find here.