mirror of
https://github.com/devgianlu/go-librespot.git
synced 2026-04-26 05:15:49 +03:00
[GH-ISSUE #56] feat: go gettable module path #48
Labels
No labels
bug
enhancement
pull-request
spotify-side
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/go-librespot#48
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @marcus-crane on GitHub (Aug 3, 2024).
Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/56
Hey there,
First of all, amazing work on go-librespot and reverse engineering all of the Spotify stuff (dealer gateway etc).
I was actually looking to use parts of
go-librespotas a library just to request my player state and use it to power a playback widget.I realise that
go-librespotisn't intended to be used as a library of course but it's all wired up nicely enough that it does actually work and I have a minimum implementation using both thedealerandspclientpackages to receive messages.The only remaining thing is that
go-librespotis not actually importable as a standard Go library, due to its module path ingo.modnot being a valid path.Basically,
go getexpects the path that you require a package from (in this case, the Github URL) to be the same as the module path (themoduledirective in go.mod)I realise of course that supporting usage as a library is an entirely different thing than supporting an audio client so I don't expect that anyone using it as a library should expect any guarantees around breaking changes, interfaces staying public and so on.
It just turns out that everything in Go is importable as a library whether intended or not so it's a nice side effect to support even if it's not explicitly offered.
In the meantime, I've been getting by with cloning
go-librespotinto my local repo and then adding the following to mygo.modfile as a workaround:Much appreciated 🙂
@devgianlu commented on GitHub (Aug 6, 2024):
You are most definitely right, the module name should match that of the repository. I have updated it:
github.com/devgianlu/go-librespot@34f6371d9d@marcus-crane commented on GitHub (Aug 7, 2024):
Thanks! I can remove my temporary git submodule but glad to say that I got a nice working Spotify Connect client with your great library 🙂