From f337ff945a0dff28551d34506d1ebd3514689446 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Thu, 2 Apr 2020 08:35:27 -0600 Subject: [PATCH] Update name to xcaddy --- README.md | 6 +++--- builder.go | 2 +- cmd/xcaddy/main.go | 10 +++++----- environment.go | 2 +- go.mod | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index f55c0d3..f8dbc14 100644 --- a/README.md +++ b/README.md @@ -17,15 +17,15 @@ Supports Caddy 2 and up. ```go caddyVersion := "v2.0.0-beta.20" -plugins := []builder.Dependency{ - builder.Dependency{ +plugins := []xcaddy.Dependency{ + xcaddy.Dependency{ ModulePath: "github.com/caddyserver/nginx-adapter", Version: "6c484552e630ccac384d2d9c43c9d14c4e8d2e56", }, } output := "./caddy" -err := builder.Build(caddyVersion, plugins, output) +err := xcaddy.Build(caddyVersion, plugins, output) ``` Versions can be anything compatible with `go get`. diff --git a/builder.go b/builder.go index d6b1b99..af00f5b 100644 --- a/builder.go +++ b/builder.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package builder +package xcaddy import ( "fmt" diff --git a/cmd/xcaddy/main.go b/cmd/xcaddy/main.go index 9b4cd02..74f5d2e 100644 --- a/cmd/xcaddy/main.go +++ b/cmd/xcaddy/main.go @@ -24,7 +24,7 @@ import ( "strings" "time" - "github.com/caddyserver/builder" + "github.com/caddyserver/xcaddy" ) func main() { @@ -44,7 +44,7 @@ func main() { func runBuild(args []string) error { // parse the command line args... rather primitively var caddyVersion, output string - var plugins []builder.Dependency + var plugins []xcaddy.Dependency for i := 0; i < len(args); i++ { switch args[i] { case "--with": @@ -59,7 +59,7 @@ func runBuild(args []string) error { if len(parts) == 2 { ver = parts[1] } - plugins = append(plugins, builder.Dependency{ + plugins = append(plugins, xcaddy.Dependency{ ModulePath: mod, Version: ver, }) @@ -89,7 +89,7 @@ func runBuild(args []string) error { } // perform the build - err := builder.Build(caddyVersion, plugins, output) + err := xcaddy.Build(caddyVersion, plugins, output) if err != nil { log.Fatalf("[FATAL] %v", err) } @@ -131,7 +131,7 @@ func runDev(caddyVersion string, args []string) error { moduleDir := strings.TrimSpace(string(out)) // build caddy with this module plugged in - err = builder.Build(caddyVersion, []builder.Dependency{ + err = xcaddy.Build(caddyVersion, []xcaddy.Dependency{ { ModulePath: currentModule, Replace: moduleDir, diff --git a/environment.go b/environment.go index b388d7b..9ee4752 100644 --- a/environment.go +++ b/environment.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package builder +package xcaddy import ( "bytes" diff --git a/go.mod b/go.mod index af53135..fd3849f 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/caddyserver/builder +module github.com/caddyserver/xcaddy go 1.14