Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问怎么单独运行这个域名列表工具?我安装完各种go package后运行时提示Failed: No file found in GOPATH #236

Open
chinanoahli opened this issue Feb 29, 2020 · 4 comments

Comments

@chinanoahli
Copy link

chinanoahli commented Feb 29, 2020

可以正常build出来二进制文件,但不论是直接go run或是运行二进制文件都会提示
Failed: No file found in GOPATH

项目并没有克隆到/Users/joshua/go里面

$ export GOPATH=/Users/joshua/go 
$ export PATH=$GOPATH/bin:$PATH
$ ./main                        
Failed:  No file found in GOPATH
$ tree -d go
go
├── pkg
│   └── darwin_amd64
│       ├── github.com
│       │   └── golang
│       │       └── protobuf
│       └── go.starlark.net
└── src
    ├── github.com
    │   └── golang
    │       └── protobuf
    │           ├── descriptor
    │           ├── jsonpb
    │           │   └── jsonpb_test_proto
    │           ├── proto
    │           │   ├── proto3_proto
    │           │   └── test_proto
    │           ├── protoc-gen-go
    │           │   ├── descriptor
    │           │   ├── generator
    │           │   │   └── internal
    │           │   │       └── remap
    │           │   ├── grpc
    │           │   ├── plugin
    │           │   └── testdata
    │           │       ├── deprecated
    │           │       ├── extension_base
    │           │       ├── extension_extra
    │           │       ├── extension_user
    │           │       ├── grpc
    │           │       ├── import_public
    │           │       │   ├── importing
    │           │       │   └── sub
    │           │       ├── imports
    │           │       │   ├── fmt
    │           │       │   ├── test_a_1
    │           │       │   ├── test_a_2
    │           │       │   └── test_b_1
    │           │       ├── issue780_oneof_conflict
    │           │       ├── multi
    │           │       ├── my_test
    │           │       └── proto3
    │           └── ptypes
    │               ├── any
    │               ├── duration
    │               ├── empty
    │               ├── struct
    │               ├── timestamp
    │               └── wrappers
    ├── go.starlark.net
    │   ├── cmd
    │   │   └── starlark
    │   ├── doc
    │   ├── docs
    │   │   ├── cmd
    │   │   │   └── starlark
    │   │   ├── internal
    │   │   │   ├── chunkedfile
    │   │   │   └── compile
    │   │   ├── repl
    │   │   ├── resolve
    │   │   ├── starlark
    │   │   ├── starlarkstruct
    │   │   ├── starlarktest
    │   │   └── syntax
    │   ├── internal
    │   │   ├── chunkedfile
    │   │   ├── compile
    │   │   └── spell
    │   ├── repl
    │   ├── resolve
    │   │   └── testdata
    │   ├── starlark
    │   │   └── testdata
    │   ├── starlarkstruct
    │   │   └── testdata
    │   ├── starlarktest
    │   └── syntax
    │       └── testdata
    └── v2ray.com
        └── core
            ├── app
            │   ├── commander
            │   ├── dispatcher
            │   ├── dns
            │   ├── log
            │   │   └── command
            │   ├── policy
            │   ├── proxyman
            │   │   ├── command
            │   │   ├── inbound
            │   │   └── outbound
            │   ├── reverse
            │   ├── router
            │   └── stats
            │       └── command
            ├── common
            │   ├── bitmask
            │   ├── buf
            │   │   └── data
            │   ├── bytespool
            │   ├── crypto
            │   │   └── internal
            │   ├── dice
            │   ├── errors
            │   │   └── errorgen
            │   ├── log
            │   ├── mux
            │   ├── net
            │   ├── peer
            │   ├── platform
            │   │   ├── ctlcmd
            │   │   └── filesystem
            │   ├── protocol
            │   │   ├── bittorrent
            │   │   ├── dns
            │   │   ├── http
            │   │   ├── tls
            │   │   │   └── cert
            │   │   └── udp
            │   ├── retry
            │   ├── serial
            │   ├── session
            │   ├── signal
            │   │   ├── done
            │   │   ├── pubsub
            │   │   └── semaphore
            │   ├── stack
            │   ├── strmatcher
            │   ├── task
            │   └── uuid
            ├── external
            │   └── github.com
            │       ├── cheekybits
            │       │   └── genny
            │       │       └── generic
            │       ├── cloudflare
            │       │   └── sidh
            │       │       ├── internal
            │       │       │   ├── arith
            │       │       │   ├── isogeny
            │       │       │   └── utils
            │       │       ├── p503
            │       │       ├── p751
            │       │       └── sidh
            │       ├── lucas-clemente
            │       │   └── quic-go
            │       │       └── internal
            │       │           ├── ackhandler
            │       │           ├── congestion
            │       │           ├── crypto
            │       │           ├── flowcontrol
            │       │           ├── handshake
            │       │           ├── protocol
            │       │           ├── qerr
            │       │           ├── testdata
            │       │           ├── utils
            │       │           │   └── linkedlist
            │       │           └── wire
            │       └── marten-seemann
            │           └── qtls
            ├── features
            │   ├── dns
            │   │   └── localdns
            │   ├── inbound
            │   ├── outbound
            │   ├── policy
            │   ├── routing
            │   └── stats
            ├── infra
            │   ├── bazel
            │   ├── conf
            │   │   ├── command
            │   │   ├── json
            │   │   └── serial
            │   ├── control
            │   │   └── main
            │   └── vprotogen
            ├── main
            │   ├── confloader
            │   │   └── external
            │   ├── distro
            │   │   ├── all
            │   │   └── debug
            │   ├── json
            │   └── jsonem
            ├── proxy
            │   ├── blackhole
            │   ├── dns
            │   ├── dokodemo
            │   ├── freedom
            │   ├── http
            │   ├── mtproto
            │   ├── shadowsocks
            │   ├── socks
            │   └── vmess
            │       ├── encoding
            │       ├── inbound
            │       └── outbound
            ├── release
            │   ├── config
            │   │   ├── systemd
            │   │   └── systemv
            │   ├── doc
            │   └── verify
            ├── testing
            │   ├── coverage
            │   ├── mocks
            │   ├── scenarios
            │   └── servers
            │       ├── http
            │       ├── tcp
            │       └── udp
            └── transport
                ├── internet
                │   ├── domainsocket
                │   ├── headers
                │   │   ├── http
                │   │   ├── noop
                │   │   ├── srtp
                │   │   ├── tls
                │   │   ├── utp
                │   │   ├── wechat
                │   │   └── wireguard
                │   ├── http
                │   ├── kcp
                │   ├── quic
                │   ├── tcp
                │   ├── tls
                │   ├── udp
                │   └── websocket
                └── pipe

231 directories
@chinanoahli chinanoahli changed the title 请问怎么运行这个域名列表工具?我安装完各种go package后运行时提示Failed: No file found in GOPATH 请问怎么单独运行这个域名列表工具?我安装完各种go package后运行时提示Failed: No file found in GOPATH Feb 29, 2020
@kslr
Copy link
Contributor

kslr commented Feb 29, 2020

@rikkix
Copy link
Collaborator

rikkix commented Feb 29, 2020

run go get -u github.com/v2ray/domain-list-community to get data

@flxxyz
Copy link
Contributor

flxxyz commented Apr 2, 2020

你需要单独再 go get -u -insecure github.com/v2ray/domain-list-communityGOPATH 里面,因为会直接读取环境变量中 GOPATH 的值。
如果你是直接在项目中运行的,那就需要把当前项目的目录设置成 GOPATH
所以在你的 GOPATH 中必须要有一份原始代码🙄

还有环境变量中必须有 GOPATH,也就是 export GOPATH=/Users/joshua/go

@Loyalsoldier
Copy link
Contributor

Loyalsoldier commented Jul 16, 2020

The latest method:

  1. Install golang and git
  2. go get -v --insecure github.com/v2fly/domain-list-community
  3. Generate dlc.dat (without datapath option means use default data folder of this project):
    ${GOPATH:-$(go env GOPATH)}/bin/domain-list-community
    ${GOPATH:-$(go env GOPATH)}/bin/domain-list-community --datapath=/path/to/your/custom/data/directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants