diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..bd1472d4 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,28 @@ +name: lint +on: + push: + pull_request: + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + matrix: + go-version: [1.23.x] + os: [ubuntu-latest] + fail-fast: false + + steps: + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} + + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Go imports lint + uses: zjkmxy/golang-github-actions@v1.1.3 + with: + run: imports + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index db4263e4..a1221b71 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,22 @@ /ndnd /ndnd.exe +/gondn_tlv_gen +/gondn_tlv_gen.exe coverage.out + +# Compiler folders +.vscode +.idea + +# Temporary +.env +_build +*~ +*.sw* +*.DS_Store +__pycache__/ +*.py[cod] +*$py.class +*.log +/temp/ +*.wasm diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 00000000..49e91f64 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,41 @@ +cff-version: 1.2.0 +message: "If you use this software, please cite it as below." +authors: +- family-names: "Newberry" + given-names: "Eric" + orcid: "https://orcid.org/0000-0002-5768-5907" +- family-names: "Ma" + given-names: "Xinyu" + orcid: "https://orcid.org/0000-0002-7575-1058" +- family-names: "Zhang" + given-names: "Lixia" + orcid: "https://orcid.org/0000-0003-0701-757X" +title: "YaNFD" +version: 1.3.0 +doi: 10.1145/3460417.3482969 +date-released: 2021-09-22 +url: "https://github.com/named-data/YaNFD" +preferred-citation: + type: conference-paper + authors: + - family-names: "Newberry" + given-names: "Eric" + orcid: "https://orcid.org/0000-0002-5768-5907" + - family-names: "Ma" + given-names: "Xinyu" + orcid: "https://orcid.org/0000-0002-7575-1058" + - family-names: "Zhang" + given-names: "Lixia" + orcid: "https://orcid.org/0000-0003-0701-757X" + doi: "10.1145/3460417.3482969" + conference: + name: "ICN '21: Proceedings of the 8th ACM Conference on Information-Centric Networking" + month: 9 + start: 30 # First page number + end: 41 # Last page number + title: "YaNFD: Yet another named data networking forwarding daemon" + issue: 1 + volume: 1 + year: 2021 + publisher: "Association for Computing Machinery" + url: "https://doi.org/10.1145/3460417.3482969" diff --git a/Makefile b/Makefile index c395bf6a..d53931e9 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ VERSION = 1.3.0.0 +STD_PACKAGE = github.com/named-data/ndnd/std .PHONY: all install clean test coverage @@ -7,14 +8,24 @@ all: ndnd ndnd: clean CGO_ENABLED=0 go build -o ndnd cmd/ndnd/main.go +generate: + go generate ./... + install: install -m 755 ndnd /usr/local/bin clean: rm -f ndnd coverage.out +clean-gen: + rm -f gondn_tlv_gen + test: go test ./... -coverprofile=coverage.out coverage: go tool cover -html=coverage.out + +gondn_tlv_gen: clean-gen + go build ${STD_PACKAGE}/cmd/gondn_tlv_gen + go install ${STD_PACKAGE}/cmd/gondn_tlv_gen diff --git a/std/.gitignore b/std/.gitignore deleted file mode 100644 index dfd48034..00000000 --- a/std/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -# t Byte-compiled / optimized / DLL files -.vscode -.idea - -.env -_build -*~ -*.sw* -*.DS_Store -__pycache__/ -*.py[cod] -*$py.class -*.log - -/temp/ -/gondn_tlv_gen -*.wasm diff --git a/std/Makefile b/std/Makefile deleted file mode 100644 index 98fa0ef0..00000000 --- a/std/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -PACKAGE = github.com/named-data/ndnd/std - -gondn_tlv_gen: clean - go build ${PACKAGE}/cmd/gondn_tlv_gen - go install ${PACKAGE}/cmd/gondn_tlv_gen - -gondn_wasm_server: clean - go build ${PACKAGE}/cmd/gondn_wasm_server - go install ${PACKAGE}/cmd/gondn_wasm_server - -generate: clean gondn_tlv_gen - go generate ./... - -clean: - -rm -rf ./gondn_tlv_gen diff --git a/std/README.md b/std/README.md deleted file mode 100644 index 5db751ff..00000000 --- a/std/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Go-NDN Standard Library - -go-ndn is a Go library for writing Named Data Networking applications. - -To get started with writing NDN applications in Go, please refer to the [examples](./examples) directory.