Various "missing go.sum entry for module providing package" errors occurred when compiling caddy which integrated dns.provider.cloudflare module

1. Caddy version (caddy version):

v2.30

2. How I run Caddy:

wget https://raw.githubusercontent.com/caddyserver/caddy/master/cmd/caddy/main.go
modified main.go file and added :
_ “github.com/caddy-dns/cloudflare
in file main.go , then run

go mod init caddy
go get github.com/caddyserver/caddy/v2@v2.3.0
go build

a. System environment:

Debian 10 x64
Go 1.16.1

b. Command:

paste command here

go mod init caddy
go get github.com/caddyserver/caddy/v2@v2.3.0
go build

c. Service/unit/compose file:

paste full file contents here

main.go
// Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the “License”);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an “AS IS” BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Package main is the entry point of the Caddy application.
// Most of Caddy’s functionality is provided through modules,
// which can be plugged in by adding their import below.
//
// There is no need to modify the Caddy source code to customize your
// builds. You can easily build a custom Caddy with these simple steps:
//
// 1. Copy this file (main.go) into a new folder
// 2. Edit the imports below to include the modules you want plugged in
// 3. Run go mod init caddy
// 4. Run go install or go build - you now have a custom binary!
//
package main

import (
caddycmd “github.com/caddyserver/caddy/v2/cmd

    // plug in Caddy modules here
    _ "github.com/caddyserver/caddy/v2/modules/standard"
    _ "github.com/caddy-dns/cloudflare"

)

func main() {
caddycmd.Main()
}

3. The problem I’m having:

The compile process output various “missing go.sum entry for module providing package” errors .

4. Error messages and/or full log output:

root@:~/caddy# go get github.com/caddyserver/caddy/v2@v2.3.0
go: downloading github.com/caddyserver/caddy/v2 v2.3.0
go: downloading github.com/caddyserver/certmagic v0.12.1-0.20201215190346-201f83a06067
go: downloading github.com/prometheus/client_golang v1.9.0
go: downloading go.uber.org/zap v1.16.0
go: downloading golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de
go: downloading github.com/klauspost/cpuid v1.2.5
go: downloading github.com/libdns/libdns v0.1.0
go: downloading github.com/mholt/acmez v0.1.1
go: downloading github.com/miekg/dns v1.1.30
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash v1.1.0
go: downloading github.com/cespare/xxhash/v2 v2.1.1
go: downloading github.com/golang/protobuf v1.4.3
go: downloading github.com/prometheus/client_model v0.2.0
go: downloading github.com/prometheus/common v0.15.0
go: downloading github.com/prometheus/procfs v0.2.0
go: downloading golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e
go: downloading go.uber.org/atomic v1.6.0
go: downloading go.uber.org/multierr v1.5.0
go: downloading golang.org/x/net v0.0.0-20201110031124-69a78807bb2b
go: downloading protobuf module - google.golang.org/protobuf - pkg.go.dev v1.24.0
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
go: downloading golang.org/x/text v0.3.3
go get: added github.com/caddyserver/caddy/v2 v2.3.0
root@:~/caddy# go build
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddyhttp/templates/tplcontext.go:30:2: missing go.sum entry for module providing package github.com/Masterminds/sprig/v3 (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/templates); to add:
go get github.com/caddyserver/caddy/v2/modules/caddyhttp/templates@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddyhttp/templates/tplcontext.go:31:2: missing go.sum entry for module providing package github.com/alecthomas/chroma/formatters/html (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/templates); to add:
go get github.com/caddyserver/caddy/v2/modules/caddyhttp/templates@v2.3.0
main.go:34:2: no required module provides package github.com/caddy-dns/cloudflare; to add it:
go get github.com/caddy-dns/cloudflare
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/caddyconfig/httpcaddyfile/serveroptions.go:25:2: missing go.sum entry for module providing package github.com/dustin/go-humanize (imported by github.com/caddyserver/caddy/v2/modules/logging); to add:
go get github.com/caddyserver/caddy/v2/modules/logging@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddypki/acmeserver/acmeserver.go:29:2: missing go.sum entry for module providing package github.com/go-chi/chi (imported by github.com/caddyserver/caddy/v2/modules/caddypki/acmeserver); to add:
go get github.com/caddyserver/caddy/v2/modules/caddypki/acmeserver@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddyhttp/celmatcher.go:29:2: missing go.sum entry for module providing package github.com/google/cel-go/cel (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp); to add:
go get github.com/caddyserver/caddy/v2/modules/caddyhttp@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddyhttp/celmatcher.go:30:2: missing go.sum entry for module providing package github.com/google/cel-go/checker/decls (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp); to add:
go get github.com/caddyserver/caddy/v2/modules/caddyhttp@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddyhttp/celmatcher.go:31:2: missing go.sum entry for module providing package github.com/google/cel-go/common/types (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp); to add:
go get github.com/caddyserver/caddy/v2/modules/caddyhttp@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddyhttp/celmatcher.go:32:2: missing go.sum entry for module providing package github.com/google/cel-go/common/types/ref (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp); to add:
go get github.com/caddyserver/caddy/v2/modules/caddyhttp@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddyhttp/celmatcher.go:33:2: missing go.sum entry for module providing package github.com/google/cel-go/common/types/traits (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp); to add:
go get github.com/caddyserver/caddy/v2/modules/caddyhttp@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddyhttp/celmatcher.go:34:2: missing go.sum entry for module providing package github.com/google/cel-go/ext (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp); to add:
go get github.com/caddyserver/caddy/v2/modules/caddyhttp@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddyhttp/celmatcher.go:35:2: missing go.sum entry for module providing package github.com/google/cel-go/interpreter/functions (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp); to add:
go get github.com/caddyserver/caddy/v2/modules/caddyhttp@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/logging/encoders.go:25:2: missing go.sum entry for module providing package github.com/jsternberg/zap-logfmt (imported by github.com/caddyserver/caddy/v2/modules/logging); to add:
go get github.com/caddyserver/caddy/v2/modules/logging@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddyhttp/encode/gzip/gzip.go:25:2: missing go.sum entry for module providing package github.com/klauspost/compress/gzip (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip); to add:
go get github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddyhttp/encode/zstd/zstd.go:21:2: missing go.sum entry for module providing package github.com/klauspost/compress/zstd (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd); to add:
go get github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddytls/values.go:23:2: missing go.sum entry for module providing package github.com/klauspost/cpuid/v2 (imported by github.com/caddyserver/caddy/v2/modules/caddytls); to add:
go get github.com/caddyserver/caddy/v2/modules/caddytls@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddyhttp/app.go:28:2: missing go.sum entry for module providing package github.com/lucas-clemente/quic-go/http3 (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp); to add:
go get github.com/caddyserver/caddy/v2/modules/caddyhttp@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddyhttp/templates/frontmatter.go:9:2: missing go.sum entry for module providing package github.com/naoina/toml (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/templates); to add:
go get github.com/caddyserver/caddy/v2/modules/caddyhttp/templates@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddypki/acmeserver/acmeserver.go:30:2: missing go.sum entry for module providing package github.com/smallstep/certificates/acme (imported by github.com/caddyserver/caddy/v2/modules/caddypki/acmeserver); to add:
go get github.com/caddyserver/caddy/v2/modules/caddypki/acmeserver@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddypki/acmeserver/acmeserver.go:31:2: missing go.sum entry for module providing package github.com/smallstep/certificates/acme/api (imported by github.com/caddyserver/caddy/v2/modules/caddypki/acmeserver); to add:
go get github.com/caddyserver/caddy/v2/modules/caddypki/acmeserver@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddypki/ca.go:28:2: missing go.sum entry for module providing package github.com/smallstep/certificates/authority (imported by github.com/caddyserver/caddy/v2/modules/caddypki); to add:
go get github.com/caddyserver/caddy/v2/modules/caddypki@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddytls/internalissuer.go:29:2: missing go.sum entry for module providing package github.com/smallstep/certificates/authority/provisioner (imported by github.com/caddyserver/caddy/v2/modules/caddypki/acmeserver); to add:
go get github.com/caddyserver/caddy/v2/modules/caddypki/acmeserver@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddypki/ca.go:29:2: missing go.sum entry for module providing package github.com/smallstep/certificates/db (imported by github.com/caddyserver/caddy/v2/modules/caddypki); to add:
go get github.com/caddyserver/caddy/v2/modules/caddypki@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddypki/certificates.go:21:2: missing go.sum entry for module providing package github.com/smallstep/cli/crypto/x509util (imported by github.com/caddyserver/caddy/v2/modules/caddypki); to add:
go get github.com/caddyserver/caddy/v2/modules/caddypki@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddypki/acmeserver/acmeserver.go:35:2: missing go.sum entry for module providing package github.com/smallstep/nosql (imported by github.com/caddyserver/caddy/v2/modules/caddypki/acmeserver); to add:
go get github.com/caddyserver/caddy/v2/modules/caddypki/acmeserver@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddypki/ca.go:30:2: missing go.sum entry for module providing package github.com/smallstep/truststore (imported by github.com/caddyserver/caddy/v2/modules/caddypki); to add:
go get github.com/caddyserver/caddy/v2/modules/caddypki@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddyhttp/templates/tplcontext.go:34:2: missing go.sum entry for module providing package github.com/yuin/goldmark (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/templates); to add:
go get github.com/caddyserver/caddy/v2/modules/caddyhttp/templates@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddyhttp/templates/tplcontext.go:35:2: missing go.sum entry for module providing package github.com/yuin/goldmark-highlighting (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/templates); to add:
go get github.com/caddyserver/caddy/v2/modules/caddyhttp/templates@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddyhttp/templates/tplcontext.go:36:2: missing go.sum entry for module providing package github.com/yuin/goldmark/extension (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/templates); to add:
go get github.com/caddyserver/caddy/v2/modules/caddyhttp/templates@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddyhttp/templates/tplcontext.go:37:2: missing go.sum entry for module providing package github.com/yuin/goldmark/parser (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/templates); to add:
go get github.com/caddyserver/caddy/v2/modules/caddyhttp/templates@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddyhttp/templates/tplcontext.go:38:2: missing go.sum entry for module providing package github.com/yuin/goldmark/renderer/html (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/templates); to add:
go get github.com/caddyserver/caddy/v2/modules/caddyhttp/templates@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddyhttp/celmatcher.go:36:2: missing go.sum entry for module providing package google.golang.org/genproto/googleapis/api/expr/v1alpha1 (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp); to add:
go get github.com/caddyserver/caddy/v2/modules/caddyhttp@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/logging/filewriter.go:28:2: missing go.sum entry for module providing package gopkg.in/natefinch/lumberjack.v2 (imported by github.com/caddyserver/caddy/v2/modules/logging); to add:
go get github.com/caddyserver/caddy/v2/modules/logging@v2.3.0
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/modules/caddyhttp/templates/frontmatter.go:10:2: missing go.sum entry for module providing package gopkg.in/yaml.v2 (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/templates); to add:
go get github.com/caddyserver/caddy/v2/modules/caddyhttp/templates@v2.3.0

I’d noticed the issue in Github

Then I’ve changed the compile command:
go mod tidy
go get github.com/caddyserver/caddy/v2@v2.3.0
go build

But another error “not enough arguments in call to certmagic.CleanUpOwnLocks” occured .

root@:~/caddy# go mod tidy
go: downloading GitHub - pkg/errors: Simple error handling primitives v0.9.1
go: downloading GitHub - stretchr/testify: A toolkit with common assertions and mocks that plays nicely with the standard library v1.5.1
go: downloading golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f
go: downloading honnef.co/go/tools v0.0.1-2019.2.3
go: downloading GitHub - smallstep/certificates: 🛡️ A private certificate authority (X.509 & SSH) & ACME server for secure automated certificate management, so you can use TLS everywhere & SSO for SSH. v0.15.4
go: downloading GitHub - smallstep/cli: 🧰 A zero trust swiss army knife for working with X509, OAuth, JWT, OATH OTP, etc. v0.15.2
go: downloading GitHub - smallstep/truststore: Package to locally install development certificates v0.9.6
go: downloading GitHub - go-chi/chi: lightweight, idiomatic and composable router for building Go HTTP services v4.1.2+incompatible
go: downloading GitHub - smallstep/nosql: NoSQL is an abstraction layer for data persistency v0.3.0
go: downloading github.com/klauspost/cpuid/v2 v2.0.1
go: downloading GitHub - dustin/go-humanize: Go Humans! (formatters for units to human friendly sizes) v1.0.1-0.20200219035652-afde56e7acac
go: downloading GitHub - jsternberg/zap-logfmt v1.2.0
go: downloading gopkg.in/natefinch/lumberjack.v2 v2.0.0
go: downloading gopkg.in/yaml.v2 v2.3.0
go: downloading The Go Programming Language v0.0.0-20190911185100-cd5d95a43a6e
go: downloading go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee
go: downloading GitHub - davecgh/go-spew: Implements a deep pretty printer for Go data structures to aid in debugging v1.1.1
go: downloading GitHub - pmezard/go-difflib: Partial port of Python difflib package to Go v1.0.0
go: downloading The Go Programming Language v0.0.0-20200106190116-7be0a674c9fc
go: downloading GitHub - google/cel-go: Fast, portable, non-Turing complete expression evaluation with gradual typing (Go) v0.6.0
go: downloading GitHub - quic-go/quic-go: A QUIC implementation in pure go v0.19.3
go: downloading genproto module - google.golang.org/genproto - Go Packages v0.0.0-20200806141610-86f49bd18e98
go: downloading GitHub - klauspost/compress: Optimized Go Compression Packages v1.11.3
go: downloading github.com/Masterminds/sprig/v3 v3.1.0
go: downloading GitHub - alecthomas/chroma: A general purpose syntax highlighter in pure Go v0.8.2
go: downloading GitHub - naoina/toml: TOML parser and encoder library for Golang v0.1.1
go: downloading GitHub - yuin/goldmark: 🏆 A markdown parser written in Go. Easy to extend, standard(CommonMark) compliant, well structured. v1.2.1
go: downloading GitHub - yuin/goldmark-highlighting: A Syntax highlighting extension for the goldmark markdown parser. v0.0.0-20200307114337-60d527fdb691
go: downloading go.step.sm/crypto v0.6.0
go: downloading GitHub - smallstep/assert: A simple assertion framework for Go v0.0.0-20200723003110-82e2b9b3b262
go: downloading gopkg.in/square/go-jose.v2 v2.5.1
go: downloading howett.net/plist v0.0.0-20181124034731-591f970eefbb
go: downloading GitHub - BurntSushi/toml: TOML parser for Golang with reflection. v0.3.1
go: downloading GitHub - google/go-cmp: Package for comparing Go values in tests v0.4.0
go: downloading gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15
go: downloading GitHub - quic-go/qpack: a (minimal) QPACK (RFC 9204) implementation in Go v0.2.1
go: downloading GitHub - golang/mock: GoMock is a mocking framework for the Go programming language. v1.4.4
go: downloading GitHub - onsi/ginkgo: A Modern Testing Framework for Go v1.14.0
go: downloading GitHub - onsi/gomega: Ginkgo's Preferred Matcher Library v1.10.1
go: downloading grpc package - google.golang.org/grpc - Go Packages v1.27.1
go: downloading GitHub - Masterminds/goutils: GoUtils is a Go implementation of some string manipulation libraries of Apache Commons. This is an open source project aimed at providing Go users with utility functions to manipulate strings in various ways. v1.1.0
go: downloading GitHub - Masterminds/semver: Work with Semantic Versions in Go v1.4.2
go: downloading github.com/Masterminds/semver/v3 v3.1.0
go: downloading GitHub - google/uuid: Go package for UUIDs based on RFC 4122 and DCE 1.1: Authentication and Security Services. v1.1.1
go: downloading GitHub - huandu/xstrings: Implements string functions widely used in other languages but absent in Go. v1.3.1
go: downloading GitHub - darccio/mergo: Mergo: merging Go structs and maps since 2013 v0.3.8
go: downloading GitHub - mitchellh/copystructure: Go (golang) library for deep copying values in Go. v1.0.0
go: downloading GitHub - spf13/cast: safe and easy casting from one type to another in Go v1.3.1
go: downloading GitHub - alecthomas/assert: A simple assertion library using Go generics v0.0.0-20170929043011-405dbfeb8e38
go: downloading GitHub - naoina/go-stringutil: Faster string utilities implementation for Go v0.1.0
go: downloading GitHub - kylelemons/godebug: Debugging helper utilities for Go v1.1.0
go: downloading GitHub - urfave/cli: A simple, fast, and fun package for building command line apps in Go v1.22.2
go: downloading GitHub - rs/xid: xid is a globally unique id generator thought for the web v1.2.1
go: downloading github.com/sirupsen/logrus v1.6.0
go: downloading github.com/dgraph-io/badger v1.5.3
go: downloading github.com/dgraph-io/badger/v2 v2.0.1-rc1.0.20200413122845-09dd2e1a4195
go: downloading go.etcd.io/bbolt v1.3.3
go: downloading github.com/go-sql-driver/mysql v1.5.0
go: downloading github.com/kr/pretty v0.1.0
go: downloading github.com/antlr/antlr4 v0.0.0-20200503195918-621b933c7a7f
go: downloading github.com/cheekybits/genny v1.0.0
go: downloading github.com/marten-seemann/qtls v0.10.0
go: downloading github.com/marten-seemann/qtls-go1-15 v0.1.1
go: downloading github.com/mitchellh/reflectwalk v1.0.0
go: downloading github.com/dlclark/regexp2 v1.2.0
go: downloading github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721
go: downloading github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897
go: downloading github.com/sergi/go-diff v1.0.0
go: downloading github.com/aws/aws-sdk-go v1.30.29
go: downloading cloud.google.com/go v0.51.0
go: downloading github.com/googleapis/gax-go v2.0.0+incompatible
go: downloading github.com/googleapis/gax-go/v2 v2.0.5
go: downloading google.golang.org/api v0.15.0
go: downloading github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e
go: downloading github.com/manifoldco/promptui v0.3.1
go: downloading github.com/cpuguy83/go-md2man v1.0.10
go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.0
go: downloading github.com/konsorten/go-windows-terminal-sequences v1.0.3
go: downloading github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2
go: downloading github.com/dgraph-io/ristretto v0.0.2-0.20200115201040-8f368f2f2ab3
go: downloading golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
go: downloading github.com/kr/text v0.1.0
go: downloading github.com/nxadm/tail v1.4.4
go: downloading github.com/mattn/go-isatty v0.0.12
go: downloading github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964
go: downloading golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6
go: downloading github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1
go: downloading github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a
go: downloading github.com/russross/blackfriday v1.5.2
go: downloading github.com/russross/blackfriday/v2 v2.0.1
go: downloading github.com/samfoo/ansi v0.0.0-20160124022901-b6bd2ded7189
go: downloading github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9
go: downloading github.com/golang/snappy v0.0.1
go: downloading github.com/DataDog/zstd v1.4.1
go: downloading gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7
go: downloading github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
go: downloading github.com/jmespath/go-jmespath v0.3.0
go: downloading google.golang.org/appengine v1.6.5
go: downloading github.com/chzyer/logex v1.1.10
go: downloading github.com/mattn/go-colorable v0.1.6
go: downloading github.com/shurcooL/sanitized_anchor_name v1.0.0
go: downloading github.com/OneOfOne/xxhash v1.2.2
go: downloading github.com/spaolacci/murmur3 v1.1.0
go: downloading github.com/fsnotify/fsnotify v1.4.9
go: downloading go.opencensus.io v0.22.2
go: downloading github.com/lunixbochs/vtclean v1.0.0
go: downloading github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7
go: finding module for package github.com/caddy-dns/cloudflare
go: downloading github.com/caddy-dns/cloudflare v0.0.0-20210227191100-728f5b67d095
go: found github.com/caddy-dns/cloudflare in github.com/caddy-dns/cloudflare v0.0.0-20210227191100-728f5b67d095
go: downloading github.com/caddyserver/caddy/v2 v2.4.0-beta.1
go: downloading github.com/libdns/cloudflare v0.1.0
go: downloading github.com/caddyserver/certmagic v0.12.1-0.20210211020017-ebb8d8b435b4
go: downloading github.com/libdns/libdns v0.2.0
go: downloading github.com/mholt/acmez v0.1.3
root@:~/caddy# go get github.com/caddyserver/caddy/v2@v2.3.0

github.com/caddyserver/caddy/v2

/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/caddy.go:472:27: not enough arguments in call to certmagic.CleanUpOwnLocks
have ()
want (*zap.Logger)
/tmp/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.3.0/sigtrap_posix.go:38:30: not enough arguments in call to certmagic.CleanUpOwnLocks
have ()
want (*zap.Logger)

I recommend using xcaddy instead, it’s simpler.

That said, there’s a known issue with building the cloudflare plugin for v2.3.0:

Try this:

xcaddy build v2.3.0 --with github.com/caddy-dns/cloudflare@eda8e5aa22232e9c279b0df7531f20c331b331c6

Ah thanks for the fast reply ~ It seemed a bit complicated for me , maybe I would down grade Go to 1.15 and try compiling again under old command . :rofl:

BTW did the develop team has ever consider that release various branches that integrated dns or other modules , insteed of guiding users to compiling on their own ?

DNS plugins are community maintained, and not needed by all users. We prefer to have users grab a build with only has the features they need, to avoid bloat. You can use the download page to get a build with the plugins you need, without building it yourself: Download Caddy

This topic was automatically closed after 30 days. New replies are no longer allowed.