Fix: compatible with Go v1.16 (#422)

The flag `--insecure` in go get command has been deprecated in Go v1.16

Fixes #421
Fixes #420
This commit is contained in:
Loyalsoldier
2021-02-25 12:35:05 +08:00
committed by GitHub
parent 4449fcb890
commit 36f0a37aea
5 changed files with 71 additions and 140 deletions

View File

@ -8,8 +8,8 @@ This project is not opinionated. In other words, it does NOT endorse, claim or i
## Download links
- **dlc.dat**[https://github.com/v2fly/domain-list-community/raw/release/dlc.dat](https://github.com/v2fly/domain-list-community/raw/release/dlc.dat)
- **dlc.dat.sha256sum**[https://github.com/v2fly/domain-list-community/raw/release/dlc.dat.sha256sum](https://github.com/v2fly/domain-list-community/raw/release/dlc.dat.sha256sum)
- **dlc.dat**[https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat](https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat)
- **dlc.dat.sha256sum**[https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat.sha256sum](https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat.sha256sum)
## Usage example
@ -67,10 +67,14 @@ Each file in the `data` directory can be used as a rule in this format: `geosite
## Generate `dlc.dat` manually
- Install `golang` and `git`
- Download and install project code: `go get -v --insecure github.com/v2fly/domain-list-community`
- Generate `dlc.dat` (without `datapath` option means to use `data` directory of this repository in `$GOPATH`):
- `${GOPATH:-$(go env GOPATH)}/bin/domain-list-community`
- `${GOPATH:-$(go env GOPATH)}/bin/domain-list-community --datapath=/path/to/your/custom/data/directory`
- Clone project code: `git clone https://github.com/v2fly/domain-list-community.git`
- Navigate to project root directory: `cd domain-list-community`
- Install project dependencies: `go mod download`
- Generate `dlc.dat` (without `datapath` option means to use domain lists in `data` directory of current working directory):
- `go run ./`
- `go run ./ --datapath=/path/to/your/custom/data/directory`
Run `go run ./ --help` for more usage information.
## Structure of data