GO version:
go version go1.12.1 linux/amd64
caddy -version)?$GOPATH/pkg/mod/github.com/mholt/[email protected]
Building caddy from source using the steps provided here.
None
Not yet built.
I only ran the first build step:
go get github.com/mholt/caddy/caddy
A successful build with no errors.
go: finding github.com/hashicorp/go-syslog v1.0.0
go: finding github.com/jimstudt/http-authentication v0.0.0-20140401203705-3eca13d6893a
go: finding github.com/lucas-clemente/aes12 v0.0.0-20171027163421-cd47fb39b79f
go: finding github.com/mholt/caddy v0.11.5
go: finding github.com/naoina/go-stringutil v0.1.0
go: finding github.com/shurcooL/sanitized_anchor_name v1.0.0
go: finding github.com/dustin/go-humanize v1.0.0
go: finding go.etcd.io/bbolt v1.3.2
go: finding golang.org/x/oauth2 v0.0.0-20190319182350-c85d3e98c914
go: finding gopkg.in/yaml.v2 v2.2.2
go: finding github.com/itsyouonline/caddy-integration v0.9.12
go: finding github.com/google/uuid v1.1.1
go: finding github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568
go: finding github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: finding cloud.google.com/go v0.34.0
go: finding github.com/caddyserver/builds v0.0.0-20170910200810-c62e2219460a
go: finding golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e
go: finding gopkg.in/natefinch/lumberjack.v2 v2.0.0
go: finding golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4
go: finding github.com/GeertJohan/go.rice v1.0.0
go: finding github.com/lucas-clemente/quic-go-certificates v0.0.0-20160823095156-d2f86524cced
go: finding github.com/lucas-clemente/quic-go v0.10.1
go: finding github.com/mholt/certmagic v0.0.0-20190401183034-f1fdb7fe9cd1
go: finding github.com/xenolf/lego v2.4.0+incompatible
go: finding github.com/asdine/storm v2.1.2+incompatible
go: finding github.com/hashicorp/golang-lru v0.5.1
go: finding github.com/davecgh/go-spew v1.1.1
go: finding github.com/filebrowser/caddy v2.0.3+incompatible
go: finding github.com/gorilla/websocket v1.4.0
go: finding github.com/daaku/go.zipexe v1.0.0
go: finding google.golang.org/appengine v1.4.0
go: finding github.com/klauspost/cpuid v1.2.0
go: finding github.com/go-acme/lego v2.3.1-0.20190318164254-3684cc738d37+incompatible
go: finding gopkg.in/square/go-jose.v2 v2.2.2
go: finding golang.org/x/sys v0.0.0-20190124100055-b90733256f2e
go: finding github.com/stretchr/testify v1.3.0
go: finding github.com/akavel/rsrc v0.8.0
go: finding github.com/golang/protobuf v1.2.0
go: finding gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
go: finding golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b
go: finding golang.org/x/net v0.0.0-20180724234803-3673e40ba225
go: finding github.com/davecgh/go-spew v1.1.0
go: finding github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229
go: finding github.com/pmezard/go-difflib v1.0.0
go: finding github.com/cenkalti/backoff v2.1.1+incompatible
go: finding github.com/bifurcation/mint v0.0.0-20190129141059-83ba9bc2ead9
go: finding github.com/GeertJohan/go.incremental v1.0.0
go: finding golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3
go: finding github.com/stretchr/objx v0.1.0
go: finding github.com/jessevdk/go-flags v1.4.0
go: finding github.com/russross/blackfriday v2.0.0+incompatible
go: finding github.com/naoina/toml v0.1.1
go: finding github.com/cheekybits/genny v1.0.0
go: finding github.com/valyala/fasttemplate v1.0.1
go: finding github.com/miekg/dns v1.1.3
go: finding golang.org/x/text v0.3.0
go: finding github.com/valyala/bytebufferpool v1.0.0
go: finding github.com/mholt/caddy/caddy latest [17/18762]
go: downloading github.com/mholt/caddy v0.11.5
go: extracting github.com/mholt/caddy v0.11.5
go: downloading github.com/xenolf/lego v2.4.0+incompatible
go: downloading github.com/mholt/certmagic v0.0.0-20190401183034-f1fdb7fe9cd1
go: downloading gopkg.in/natefinch/lumberjack.v2 v2.0.0
go: downloading github.com/lucas-clemente/quic-go v0.10.1
go: downloading github.com/hashicorp/go-syslog v1.0.0
go: downloading golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3
go: downloading github.com/dustin/go-humanize v1.0.0
go: extracting github.com/hashicorp/go-syslog v1.0.0
go: downloading github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568
go: extracting gopkg.in/natefinch/lumberjack.v2 v2.0.0
go: extracting github.com/mholt/certmagic v0.0.0-20190401183034-f1fdb7fe9cd1
go: downloading github.com/russross/blackfriday v2.0.0+incompatible
go: extracting github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568
go: downloading golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b
go: downloading github.com/go-acme/lego v2.3.1-0.20190318164254-3684cc738d37+incompatible
go: extracting github.com/dustin/go-humanize v1.0.0
go: extracting github.com/russross/blackfriday v2.0.0+incompatible
go: extracting github.com/lucas-clemente/quic-go v0.10.1
go: downloading github.com/bifurcation/mint v0.0.0-20190129141059-83ba9bc2ead9
go: extracting github.com/bifurcation/mint v0.0.0-20190129141059-83ba9bc2ead9
go: extracting golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3
go: downloading github.com/jimstudt/http-authentication v0.0.0-20140401203705-3eca13d6893a
go: extracting github.com/jimstudt/http-authentication v0.0.0-20140401203705-3eca13d6893a
go: extracting golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b
go: downloading github.com/cheekybits/genny v1.0.0
go: extracting github.com/cheekybits/genny v1.0.0
go: extracting github.com/xenolf/lego v2.4.0+incompatible
go: downloading github.com/lucas-clemente/quic-go-certificates v0.0.0-20160823095156-d2f86524cced
go: downloading golang.org/x/text v0.3.0
go: extracting github.com/lucas-clemente/quic-go-certificates v0.0.0-20160823095156-d2f86524cced
go: extracting github.com/go-acme/lego v2.3.1-0.20190318164254-3684cc738d37+incompatible
go: downloading github.com/google/uuid v1.1.1
go: extracting github.com/google/uuid v1.1.1
go: downloading github.com/hashicorp/golang-lru v0.5.1
go: downloading github.com/shurcooL/sanitized_anchor_name v1.0.0
go: downloading github.com/naoina/toml v0.1.1
go: downloading github.com/klauspost/cpuid v1.2.0
go: downloading github.com/lucas-clemente/aes12 v0.0.0-20171027163421-cd47fb39b79f
go: downloading github.com/gorilla/websocket v1.4.0
go: downloading gopkg.in/square/go-jose.v2 v2.2.2
go: extracting github.com/shurcooL/sanitized_anchor_name v1.0.0
go: downloading gopkg.in/yaml.v2 v2.2.2
go: extracting github.com/hashicorp/golang-lru v0.5.1
go: downloading github.com/cenkalti/backoff v2.1.1+incompatible
go: extracting github.com/lucas-clemente/aes12 v0.0.0-20171027163421-cd47fb39b79f
go: downloading github.com/miekg/dns v1.1.3
go: extracting github.com/naoina/toml v0.1.1
go: downloading github.com/naoina/go-stringutil v0.1.0
go: extracting github.com/gorilla/websocket v1.4.0
go: extracting github.com/klauspost/cpuid v1.2.0
go: extracting github.com/naoina/go-stringutil v0.1.0
go: extracting github.com/cenkalti/backoff v2.1.1+incompatible
go: extracting gopkg.in/yaml.v2 v2.2.2
go: extracting gopkg.in/square/go-jose.v2 v2.2.2
go: extracting github.com/miekg/dns v1.1.3
go: downloading golang.org/x/sys v0.0.0-20190124100055-b90733256f2e
go: extracting golang.org/x/sys v0.0.0-20190124100055-b90733256f2e
go: extracting golang.org/x/text v0.3.0
# github.com/mholt/caddy/caddyhttp/markdown/summary
../../go/pkg/mod/github.com/mholt/[email protected]/caddyhttp/markdown/summary/render.go:24:5: cannot use (*renderer)(nil) (type *renderer) as type blackfriday.Renderer in assignment:
*renderer does not implement blackfriday.Renderer (missing RenderFooter method)
../../go/pkg/mod/github.com/mholt/[email protected]/caddyhttp/markdown/summary/summary.go:26:44: too many arguments to conversion to blackfriday.Markdown: blackfriday.Markdown(input, renderer literal, 0)
# github.com/lucas-clemente/quic-go/internal/crypto
../../go/pkg/mod/github.com/lucas-clemente/[email protected]/internal/crypto/key_derivation.go:46:37: cs.KeyLen undefined (type mint.CipherSuiteParams has no field or method KeyLen)
../../go/pkg/mod/github.com/lucas-clemente/[email protected]/internal/crypto/key_derivation.go:47:35: cs.IvLen undefined (type mint.CipherSuiteParams has no field or method IvLen)
# github.com/mholt/caddy/caddytls
../../go/pkg/mod/github.com/mholt/[email protected]/caddytls/setup.go:174:28: cannot use value (type "github.com/xenolf/lego/certcrypto".KeyType) as type "github.com/go-acme/lego/certcrypto".KeyType in assignment
../../go/pkg/mod/github.com/mholt/[email protected]/caddytls/setup.go:354:4: cannot use config.Manager.KeyType (type "github.com/go-acme/lego/certcrypto".KeyType) as type "github.com/xenolf/lego/certcrypto".KeyType
in field value
I think it's a dependency one.
Nothing
I cannot reproduce your issue. It seems like you are using caddy@v0 11. 5 which does not support modules, please update your local copy.

Well, i didn't get caddy myself, this is the version thatgo get grabbed!
Instead of $GOPATH/pkg/mod/github.com/mholt/[email protected], please use $GOPATH/src/github.com/mholt/caddy, as [email protected] does not support modules - You are in the wrong directory.
Additionally, you can run this to build Caddy outside of your GOPATH (any directory you like e.g. ~)
git clone https://github.com/mholt/caddy
cd caddy/caddy
go run build.go
I'm using doc from main page:

and have same error, why go install downloads 0.11.5?
```package main
import (
"github.com/mholt/caddy/caddy/caddymain"
// plug in plugins here, for example:
// _ "import/path/here"
)
func main() {
// optional: disable telemetry
caddymain.EnableTelemetry = false
caddymain.Run()
}
```
```Step 6/7 : RUN go mod init mycaddy_build && go install
---> Running in d043e7fbc90d
go: creating new go.mod: module mycaddy_build
go: finding github.com/mholt/caddy/caddy/caddymain latest
go: finding github.com/mholt/caddy/caddy latest
go: finding github.com/mholt/caddy v0.11.5
go: downloading github.com/mholt/caddy v0.11.5
go: extracting github.com/mholt/caddy v0.11.5
go: finding github.com/klauspost/cpuid v1.2.0
go: finding github.com/jimstudt/http-authentication/basic latest
go: finding github.com/hashicorp/go-syslog v1.0.0
go: finding github.com/flynn/go-shlex latest
go: finding github.com/dustin/go-humanize v1.0.0
go: finding github.com/gorilla/websocket v1.4.0
go: finding github.com/xenolf/lego/challenge/tlsalpn01 latest
go: finding github.com/lucas-clemente/quic-go/h2quic latest
go: finding gopkg.in/natefinch/lumberjack.v2 v2.0.0
go: downloading github.com/hashicorp/go-syslog v1.0.0
go: extracting github.com/hashicorp/go-syslog v1.0.0
go: finding github.com/xenolf/lego/certcrypto latest
go: downloading github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568
go: extracting github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568
go: downloading github.com/dustin/go-humanize v1.0.0
go: extracting github.com/dustin/go-humanize v1.0.0
go: finding github.com/xenolf/lego/challenge latest
go: finding github.com/jimstudt/http-authentication latest
go: downloading github.com/jimstudt/http-authentication v0.0.0-20140401203705-3eca13d6893a
go: extracting github.com/jimstudt/http-authentication v0.0.0-20140401203705-3eca13d6893a
go: downloading github.com/klauspost/cpuid v1.2.0
go: downloading github.com/gorilla/websocket v1.4.0
go: extracting github.com/klauspost/cpuid v1.2.0
go: extracting github.com/gorilla/websocket v1.4.0
go: downloading gopkg.in/natefinch/lumberjack.v2 v2.0.0
go: extracting gopkg.in/natefinch/lumberjack.v2 v2.0.0
go: finding github.com/lucas-clemente/quic-go v0.11.1
go: finding github.com/naoina/toml v0.1.1
go: finding golang.org/x/net/http2 latest
go: finding gopkg.in/yaml.v2 v2.2.2
go: finding github.com/google/uuid v1.1.1
go: finding golang.org/x/net latest
go: downloading golang.org/x/net v0.0.0-20190420063019-afa5a82059c6
go: downloading github.com/naoina/toml v0.1.1
go: downloading github.com/lucas-clemente/quic-go v0.11.1
go: extracting github.com/naoina/toml v0.1.1
go: downloading github.com/google/uuid v1.1.1
go: extracting github.com/google/uuid v1.1.1
go: downloading gopkg.in/yaml.v2 v2.2.2
go: extracting gopkg.in/yaml.v2 v2.2.2
go: extracting github.com/lucas-clemente/quic-go v0.11.1
go: finding github.com/russross/blackfriday v2.0.0+incompatible
go: downloading github.com/russross/blackfriday v2.0.0+incompatible
go: extracting github.com/russross/blackfriday v2.0.0+incompatible
go: extracting golang.org/x/net v0.0.0-20190420063019-afa5a82059c6
go: finding github.com/xenolf/lego v2.5.0+incompatible
go: downloading github.com/xenolf/lego v2.5.0+incompatible
go: extracting github.com/xenolf/lego v2.5.0+incompatible
go: finding github.com/mholt/certmagic v0.5.0
go: downloading github.com/mholt/certmagic v0.5.0
go: extracting github.com/mholt/certmagic v0.5.0
go: finding github.com/cheekybits/genny v1.0.0
go: finding golang.org/x/net v0.0.0-20180906233101-161cd47e91fd
go: finding github.com/onsi/gomega v1.4.3
go: finding github.com/onsi/ginkgo v1.7.0
go: finding github.com/marten-seemann/qtls v0.2.3
go: finding github.com/golang/mock v1.2.0
go: finding golang.org/x/text v0.3.0
go: finding golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25
go: finding golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: finding gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
go: finding github.com/go-acme/lego v2.5.0+incompatible
go: finding github.com/stretchr/testify v1.3.0
go: finding gopkg.in/yaml.v2 v2.2.1
go: finding golang.org/x/sys v0.0.0-20190124100055-b90733256f2e
go: finding gopkg.in/fsnotify.v1 v1.4.7
go: finding golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e
go: finding golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b
go: finding golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
go: finding golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e
go: finding github.com/cenkalti/backoff v2.1.1+incompatible
go: finding github.com/onsi/ginkgo v1.6.0
go: finding github.com/davecgh/go-spew v1.1.0
go: finding golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3
go: finding github.com/hpcloud/tail v1.0.0
go: finding gopkg.in/square/go-jose.v2 v2.2.2
go: finding github.com/pmezard/go-difflib v1.0.0
go: finding golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
go: finding golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4
go: finding github.com/fsnotify/fsnotify v1.4.7
go: finding github.com/stretchr/objx v0.1.0
go: finding github.com/golang/protobuf v1.2.0
go: finding github.com/miekg/dns v1.1.3
go: finding gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7
go: downloading github.com/go-acme/lego v2.5.0+incompatible
go: downloading golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: extracting golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: extracting github.com/go-acme/lego v2.5.0+incompatible
go: downloading golang.org/x/text v0.3.0
go: downloading github.com/marten-seemann/qtls v0.2.3
go: downloading github.com/cheekybits/genny v1.0.0
go: downloading github.com/cenkalti/backoff v2.1.1+incompatible
go: downloading gopkg.in/square/go-jose.v2 v2.2.2
go: downloading github.com/miekg/dns v1.1.3
go: extracting github.com/cenkalti/backoff v2.1.1+incompatible
go: extracting github.com/cheekybits/genny v1.0.0
go: extracting gopkg.in/square/go-jose.v2 v2.2.2
go: finding github.com/shurcooL/sanitized_anchor_name v1.0.0
go: extracting github.com/marten-seemann/qtls v0.2.3
go: downloading golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e
go: finding github.com/naoina/go-stringutil v0.1.0
go: extracting github.com/miekg/dns v1.1.3
go: extracting golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e
go: downloading github.com/shurcooL/sanitized_anchor_name v1.0.0
go: extracting github.com/shurcooL/sanitized_anchor_name v1.0.0
go: downloading github.com/naoina/go-stringutil v0.1.0
go: extracting github.com/naoina/go-stringutil v0.1.0
go: extracting golang.org/x/text v0.3.0
/go/pkg/mod/github.com/mholt/[email protected]/caddyhttp/markdown/summary/render.go:24:5: cannot use (*renderer)(nil) (type *renderer) as type blackfriday.Renderer in assignment:
*renderer does not implement blackfriday.Renderer (missing RenderFooter method)
/go/pkg/mod/github.com/mholt/[email protected]/caddyhttp/markdown/summary/summary.go:26:44: too many arguments to conversion to blackfriday.Markdown: blackfriday.Markdown(input, renderer literal, 0)
/go/pkg/mod/github.com/mholt/[email protected]/caddytls/config.go:120:5: undefined: certmagic.DefaultStorage
/go/pkg/mod/github.com/mholt/[email protected]/caddytls/config.go:125:34: undefined: certmagic.DefaultStorage
/go/pkg/mod/github.com/mholt/[email protected]/caddytls/config.go:135:12: undefined: certmagic.NewWithCache
/go/pkg/mod/github.com/mholt/[email protected]/caddytls/handshake.go:45:35: undefined: certmagic.DefaultServerName
/go/pkg/mod/github.com/mholt/[email protected]/caddytls/setup.go:66:4: undefined: certmagic.DefaultStorage
/go/pkg/mod/github.com/mholt/[email protected]/caddytls/setup.go:174:28: cannot use value (type "github.com/xenolf/lego/certcrypto".KeyType) as type "github.com/go-acme/lego/certcrypto".KeyType in assignment
/go/pkg/mod/github.com/mholt/[email protected]/caddytls/setup.go:354:4: cannot use config.Manager.KeyType (type "github.com/go-acme/lego/certcrypto".KeyType) as type "github.com/xenolf/lego/certcrypto".KeyType in field value
The command '/bin/sh -c go mod init mycaddy_build && go install' returned a non-zero code: 2```
@subvillion This is a known issue, and it will be resolved after the release of the v1.0.0 version tag.
In the meantime, you can run go get github.com/mholt/caddy@master before go build
@elcore I did go get github.com/mholt/caddy@master before building, and got the same error as https://github.com/mholt/caddy/issues/2549#issuecomment-485233629
Are you adding any plugins to your build? (Which ones?)
Filebrowser and this one https://github.com/itsyouonline/caddy-integration.
filebrowser is not compatible with Go modules yet AFAICT, it is one of the plugins I haven't been able to build since switching to modules.
File Browser itself was and is a go module. The caddy specific package wasn't because Caddy didn't support go modules at the time. I'm taking a look at it.
Most helpful comment
In the meantime, you can run
go get github.com/mholt/caddy@masterbeforego build