mdlayher / mpdsub

Command mpdsubd provides a Subsonic HTTP API bridge to a backing MPD server. MIT Licensed.
MIT License
6 stars 2 forks source link

go get doesn't install a binary #1

Open anarcat opened 6 years ago

anarcat commented 6 years ago

Hi!

There are no install instructions in the README so I went ahead and did a standard go get to install this package inside a docker image file. Unfortunately, the mpdsub command doesn't seem to get install properly:

$ go get -v github.com/mdlayher/mpdsub
github.com/mdlayher/mpdsub (download)
github.com/fhs/gompd (download)
github.com/fhs/gompd/mpd
github.com/mdlayher/mpdsub
test@8ea0e906ab42:~$ ls /go/bin/

there are static libraries built in /go/pkg though:

test@8ea0e906ab42:~$ find /go/pkg/
/go/pkg/
/go/pkg/linux_amd64
/go/pkg/linux_amd64/github.com
/go/pkg/linux_amd64/github.com/fhs
/go/pkg/linux_amd64/github.com/fhs/gompd
/go/pkg/linux_amd64/github.com/fhs/gompd/mpd.a
/go/pkg/linux_amd64/github.com/mdlayher
/go/pkg/linux_amd64/github.com/mdlayher/mpdsub.a

a workaround is to run the server directly from source:

test@8ea0e906ab42:~$ cd /go/src/github.com/mdlayher/mpdsub/
test@8ea0e906ab42:/go/src/github.com/mdlayher/mpdsub$ go run cmd/mpdsubd/main.go
2017/11/11 18:45:59 failed to dial MPD: dial tcp [::1]:6600: getsockopt: connection refused
[...]

So it seems there's something wrong either with my version of go (1.9) or with the way this package is built...

mdlayher commented 6 years ago

Try:

go get -v github.com/mdlayher/mpdsub/cmd/mpdsubd

anarcat commented 6 years ago

right, i see... then maybe renaming the command?

i'm trying to build a docker container using the basic instructions here: https://hub.docker.com/_/golang/

this assumes the repository name is the same as the command... besides, this would also fail if there were multiple commands to install.. isn't there a way to commands named differently than the package name from go get?

mdlayher commented 6 years ago

No idea about building a Docker image, sorry. I built this as kind of a one off thing and don't even use it anymore.