-
Notifications
You must be signed in to change notification settings - Fork 3
Plugging in Plugins Yourself
Jason Chu edited this page Oct 25, 2020
·
1 revision
This is only for Casket 1; Casket 2 has instructions on the README.
You can build Casket from source and plug in plugins without having to use the build server and without changing Casket's source code! You need Go installed.
- Install Go if you don't have it already.
- Set the transitional environment variable for Go modules:
export GO111MODULE=on
- Create a new folder anywhere (doesn't have to be in
$GOPATH
) - naming itcasket
is preferred. - Put this
.go
file into it, modifying it to import the plugins you want:
package main
import (
"github.com/tmpim/casket/casket/casketmain"
// plug in plugins here, for example:
// _ "import/path/here"
)
func main() {
// optional: disable telemetry
// casketmain.EnableTelemetry = false
casketmain.Run()
}
- Make your little main function a Go module:
go mod init casket
- Then
go install
will then create your binary at$GOPATH/bin
, orgo build
will put it in the current directory.