From 4c71bd234686dfd436702e5174e2d8b38a730dfa Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Tue, 23 Apr 2019 15:12:10 -0600 Subject: [PATCH] Updated Plugging in Plugins Yourself (markdown) --- Plugging-in-Plugins-Yourself.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugging-in-Plugins-Yourself.md b/Plugging-in-Plugins-Yourself.md index 5aaf470..f2cf908 100644 --- a/Plugging-in-Plugins-Yourself.md +++ b/Plugging-in-Plugins-Yourself.md @@ -3,7 +3,7 @@ You can build Caddy from source and plug in plugins without having to use the bu 1. [Install Go](https://golang.org/doc/install) 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 `caddy` is preferred. -4. Put this Go file into it, modifying it to import the plugins you want: +4. Put this `.go` file into it, modifying it to import the plugins you want: ```go package main @@ -20,5 +20,5 @@ func main() { caddymain.Run() } ``` -5. Make your little main function a Go module: `go mod init mycaddy` (the name doesn't really matter, but the filename should end in `.go`). +5. Make your little main function a Go module: `go mod init caddy` 6. Then `go install` will then create your binary at `$GOPATH/bin`, or `go build` will put it in the current directory.