jwhited / wgsd

A CoreDNS plugin that provides WireGuard peer information via DNS-SD semantics
https://www.jordanwhited.com/posts/wireguard-endpoint-discovery-nat-traversal/
MIT License
818 stars 76 forks source link

improve build instructions #27

Closed heeen closed 3 years ago

heeen commented 3 years ago

as a golang newbie, I am having trouble building from source (ubuntu)

just building with the commands given:

~/wgsd/cmd/coredns$ go build       
main.go:7:2: cannot find package "github.com/coredns/coredns/core/dnsserver" in any of:
        /usr/lib/go-1.10/src/github.com/coredns/coredns/core/dnsserver (from $GOROOT)
        /home/florian/go/src/github.com/coredns/coredns/core/dnsserver (from $GOPATH)
main.go:4:2: cannot find package "github.com/coredns/coredns/core/plugin" in any of:
        /usr/lib/go-1.10/src/github.com/coredns/coredns/core/plugin (from $GOROOT)
        /home/florian/go/src/github.com/coredns/coredns/core/plugin (from $GOPATH)
main.go:8:2: cannot find package "github.com/coredns/coredns/coremain" in any of:
        /usr/lib/go-1.10/src/github.com/coredns/coredns/coremain (from $GOROOT)
        /home/florian/go/src/github.com/coredns/coredns/coremain (from $GOPATH)
main.go:5:2: cannot find package "github.com/jwhited/wgsd" in any of:
        /usr/lib/go-1.10/src/github.com/jwhited/wgsd (from $GOROOT)
        /home/florian/go/src/github.com/jwhited/wgsd (from $GOPATH)

trying to get dependencies:

~/wgsd/cmd/coredns$ go get -d
package github.com/caddyserver/caddy/caddyfile: cannot find package "github.com/caddyserver/caddy/caddyfile" in any of:
        /usr/lib/go-1.10/src/github.com/caddyserver/caddy/caddyfile (from $GOROOT)
        /home/florian/go/src/github.com/caddyserver/caddy/caddyfile (from $GOPATH)
package crypto/ed25519: unrecognized import path "crypto/ed25519" (import path does not begin with hostname)
package github.com/caddyserver/caddy/onevent/hook: cannot find package "github.com/caddyserver/caddy/onevent/hook" in any of:
        /usr/lib/go-1.10/src/github.com/caddyserver/caddy/onevent/hook (from $GOROOT)
        /home/florian/go/src/github.com/caddyserver/caddy/onevent/hook (from $GOPATH)
^C
jwhited commented 3 years ago

package crypto/ed25519: unrecognized import path "crypto/ed25519"

crypto/ed25519 was added as a standard lib package in Go 1.13. This project requires Go1.14 or newer. If you upgrade, the build commands should work so long as Go modules are enabled.