Skip to content

Commit

Permalink
fix: fixes the package naming following the best practices from go mo…
Browse files Browse the repository at this point in the history
  • Loading branch information
jcchavezs authored Jun 11, 2023
1 parent 22910cb commit 61bb4b1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ http://127.0.0.1:8080 {
Run:

```shell
xcaddy build --with github.com/corazawaf/coraza-caddy
xcaddy build --with github.com/corazawaf/coraza-caddy/v2
```

## Testing
Expand Down
2 changes: 1 addition & 1 deletion caddy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
caddycmd "github.com/caddyserver/caddy/v2/cmd"
_ "github.com/caddyserver/caddy/v2/modules/standard"

_ "github.com/corazawaf/coraza-caddy"
_ "github.com/corazawaf/coraza-caddy/v2"
)

func main() {
Expand Down
7 changes: 1 addition & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/corazawaf/coraza-caddy
module github.com/corazawaf/coraza-caddy/v2

go 1.18

Expand Down Expand Up @@ -146,8 +146,3 @@ require (
howett.net/plist v1.0.0 // indirect
rsc.io/binaryregexp v0.2.0 // indirect
)

retract (
[v1.0.0, v1.2.2]
v1.0.0-beta.1
)
4 changes: 2 additions & 2 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func Format() error {
return sh.RunV("go", "run", fmt.Sprintf("github.com/rinchsan/gosimports/cmd/gosimports@%s", gosImportsVer),
"-w",
"-local",
"github.com/corazawaf/coraza-caddy",
"github.com/corazawaf/coraza-caddy/v2",
".")
}

Expand Down Expand Up @@ -154,7 +154,7 @@ func buildCaddy(goos string) error {
if os.Getenv("CADDY_VERSION") != "" {
buildArgs = append(buildArgs, os.Getenv("CADDY_VERSION"))
}
buildArgs = append(buildArgs, "--with", "github.com/corazawaf/coraza-caddy=.",
buildArgs = append(buildArgs, "--with", "github.com/corazawaf/coraza-caddy/v2=.",
"--output", buildDir)

return sh.RunWithV(env, "xcaddy", buildArgs...)
Expand Down

0 comments on commit 61bb4b1

Please sign in to comment.