Go bindings for MusicBrainz libdiscid
Set empty favicon on redirect page to prevent unnecessary lookups
HTML fixes for redirect page
Publish go.uploadedlobster.com/discid redirect on build



You can also use your local clone with git send-email.

#Go bindings for MusicBrainz libdiscid

PkgGoDev builds.sr.ht status


discid provides Go bindings for the MusicBrainz DiscID library libdiscid. It allows calculating DiscIDs (MusicBrainz and freedb) for Audio CDs. Additionally the library can extract the MCN/UPC/EAN and the ISRCs from disc.


  • libdiscid >= 0.6.0


package main

import (


func main() {
  // Specifying the device is optional. If set to an empty string a platform
  // specific default will be used.
  disc, err := discid.ReadFeatures("", discid.FeatureRead|discid.FeatureMcn)
  if err != nil {
  defer disc.Close()
  fmt.Printf("Disc ID: %v\n", disc.Id())
  fmt.Printf("MCN    : %v\n", disc.Mcn())

See the API documentation for details.


The source code for go-discid is available on SourceHut.

Please report any issues on the issue tracker.

Patches can be submitted to the mailing list. You can clone the repository directly on SourceHut and submit your changes with the "Prepare patchset" button. Please see SourceHut's documentation for sending patches upstream for details.


go-discid Copyright (c) 2020-2023 by Philipp Wolfer ph.wolfer@gmail.com

go-discid is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

See LICENSE for details.