Skip to content

Plugging in Plugins Yourself

Jason Chu edited this page Oct 25, 2020 · 1 revision

This page is obsolete.

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.

  1. Install Go if you don't have it already.
  2. Set the transitional environment variable for Go modules: export GO111MODULE=on
  3. Create a new folder anywhere (doesn't have to be in $GOPATH) - naming it casket is preferred.
  4. 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()
}
  1. Make your little main function a Go module: go mod init casket
  2. Then go install will then create your binary at $GOPATH/bin, or go build will put it in the current directory.