askmediagroup/dnsbench

Install instructions outdated for recent versions of Go

Closed this issue · 4 comments

I tried installing following the directions in the README but got a warning:

$ go get -u github.com/askmediagroup/dnsbench/cmd/dnsbench
go: go.mod file not found in current directory or any parent directory.
	'go get' is no longer supported outside a module.
	To build and install a command, use 'go install' with a version,
	like 'go install example.com/cmd@latest'
	For more information, see https://golang.org/doc/go-get-install-deprecation
	or run 'go help get' or 'go help install'.

$ go install github.com/askmediagroup/dnsbench/cmd/dnsbench@latest
go: downloading github.com/askmediagroup/dnsbench v0.0.0-20190415183804-140b09708a3a
go: finding module for package github.com/miekg/dns
go: finding module for package github.com/codahale/hdrhistogram
go: finding module for package github.com/spf13/cobra
go: downloading github.com/miekg/dns v1.1.49
go: downloading github.com/spf13/cobra v1.4.0
go: downloading github.com/codahale/hdrhistogram v1.1.2
go: found github.com/codahale/hdrhistogram in github.com/codahale/hdrhistogram v1.1.2
go: found github.com/spf13/cobra in github.com/spf13/cobra v1.4.0
go: found github.com/miekg/dns in github.com/miekg/dns v1.1.49
go: github.com/askmediagroup/dnsbench/cmd/dnsbench imports
	github.com/askmediagroup/dnsbench/pkg/cmd imports
	github.com/codahale/hdrhistogram: github.com/codahale/hdrhistogram@v1.1.2: parsing go.mod:
	module declares its path as: github.com/HdrHistogram/hdrhistogram-go
	        but was required as: github.com/codahale/hdrhistogram

$ echo "example.com" | dnsbench run local --concurrency 1 --count 10
zsh: command not found: dnsbench

How can I install it as a command on a modern Go install?

In case anybody else has this problem, I found a fork that works: github.com/erikh/dnsbench

go install github.com/erikh/dnsbench/cmd/dnsbench@latest

Hello @geerlingguy, I've been on hiatus for the last couple years and wasn't around to see this. The code base was left unfortunately just before the update to go modules support had been merged (#6). That's been completed now and building from source works as expected now. As for the installation instructions #8 is open to fix that in the README.

Fixed with #8

@richardmarshall - Thanks so much!