1. Caddy version (caddy version
):
1.5
2. How I run Caddy:
I run caddy as a docker container with our plugins running on top of it.
a. System environment:
We build our docker from alpine:3.7. I am running the development environment in Mac OS, Mojave.
b. Command:
I also tried:
go get github.com/caddyserver/caddy@v2.1.0
which still gives me the same error.
d. My complete Caddyfile or JSON config:
http://*:80/ {
root /var/www/html/
own_plugin
tls off
log stdout
}
3. The problem I’m having:
I am trying to upgrade caddy from 1.5 to 2.1. But after updating go.mod file to github.com/caddyserver/caddy v2.1.0, if I run go mod vendor
, I am getting the following error:
go: errors parsing go.mod:
repo/go.mod:7: require github.com/caddyserver/caddy: version "v2.1.0" invalid: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2
How can I upgrade to caddy v2.1.0?
4. Error messages and/or full log output:
go: errors parsing go.mod:
repo/go.mod:7: require github.com/caddyserver/caddy: version “v2.1.0” invalid: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2
5. What I already tried:
I also tried:
go get github.com/caddyserver/caddy@v2.1.0
which still gives me the same error.