Closed ItsIgnacioPortal closed 2 years ago
There is already support for Go modules, and there is nothing with main
package that can be installed with go install
. What support did you mean?
I mean "beeep" can no longer be installed using "go get" as the readme describes. The project needs to support "go install".
Also, I haven't been able to use this project, not even manually. How do you import it? can you provide an example that actually works? 😅
Well, no, it does not need to support go install
. You use that to install the binary in GOPATH/bin, when there is a binary, this is a library. Ignore the go get
part, you don't need to install anything before, just go mod init your project, import the library, and use it.
# cat example.go
package main
import "github.com/gen2brain/beeep"
func main() {
err := beeep.Notify("Title", "Message body", "")
if err != nil {
panic(err)
}
}
# go mod init example
go: creating new go.mod: module example
go: to add module requirements and sums:
go mod tidy
# go mod tidy
go: finding module for package github.com/gen2brain/beeep
go: found github.com/gen2brain/beeep in github.com/gen2brain/beeep v0.0.0-20220402123239-6a3042f4b71a
# go build
# ./example
This is pretty much what you would use for any other library, nothing specific about this one.
Go get has been deprecated. Please update this repo to support
go install