go mod init example.com/my-go-plugin
Note that you need to include the v in the version tag.
go get github.com/untrustedmodders/[email protected]
package main
import (
"fmt"
"github.com/untrustedmodders/go-plugify"
)
func init() {
plugify.OnPluginStart(func() {
fmt.Println("OnPluginStart")
})
plugify.OnPluginEnd(func() {
fmt.Println("OnPluginEnd")
})
}
func main() {}