DNSGrep icon indicating copy to clipboard operation
DNSGrep copied to clipboard

I have got error cannot find package "dnsgrep/DNSBinarySearch"

Open Lunpopo opened this issue 6 years ago • 4 comments

When i type command: go run experimentalServer/experimentalServer.go I have got the error: experimentalServer/experimentalServer.go:4:2: cannot find package "dnsgrep/DNSBinarySearch". The same as error result to type command line: go run dnsgrep.go -f DNSBinarySearch/test_data.txt -i "amiccom.com.tw"

What should i do and how to fix it?

Lunpopo avatar Feb 22 '19 03:02 Lunpopo

There is a go import path issue here.

This package is not directly go get-able. It expects to live at go/src/dnsgrep (based on the import line "dnsgrep/DNSBinarySearch").

There are 2 possible fixes --

  1. update the import path to the correct folder (something like github.com/erbbysam/DNSGrep)
  2. move the DNSGrep folder to go/src/dnsgrep

I will update the install directions and import paths to fix this.

erbbysam avatar Mar 10 '19 18:03 erbbysam

Can we fix the import paths in source code to make go get work? Because go get is currently the standard way to pull a Go package.

hsluoyz avatar Jul 05 '19 06:07 hsluoyz

Hi @erbbysam , if you are OK with update the import path to the correct folder (something like github.com/erbbysam/DNSGrep), I can send a PR. Do you support it?

hsluoyz avatar Aug 21 '19 03:08 hsluoyz

Dear @erbbysam: github is terrible, just contact me by email pass about half year. but fortunately is i have resolve this issue followed your suggestion just now. Thanks a lot.

@hsluoyz, hi guy, i will show you what was resolved. first at all, following the Install section go get the following packages: and then hit cd /root/go/src/ command if your Go root path is here. And in this path hit git clone https://github.com/erbbysam/DNSGrep.git and mv DNSGrep dnsgrep. Because this program import path is go/src/dnsgrep. Finally, run the command line: go run dnsgrep.go -f DNSBinarySearch/test_data.txt -i "amiccom.com.tw", this issue was done.

Lunpopo avatar Aug 21 '19 03:08 Lunpopo