Update name to xcaddy

This commit is contained in:
Matthew Holt 2020-04-02 08:35:27 -06:00
parent 22d82434ea
commit f337ff945a
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5
5 changed files with 11 additions and 11 deletions

View file

@ -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`.

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package builder
package xcaddy
import (
"fmt"

View file

@ -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,

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package builder
package xcaddy
import (
"bytes"

2
go.mod
View file

@ -1,4 +1,4 @@
module github.com/caddyserver/builder
module github.com/caddyserver/xcaddy
go 1.14