Skip to content

Commit 3c3ce44

Browse files
authored
sync: update 11 files from source repository (#12)
1 parent 80758c0 commit 3c3ce44

File tree

11 files changed

+120
-61
lines changed

11 files changed

+120
-61
lines changed

.cursorrules

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
All contributors must read `.github/AGENTS.md` for complete guidelines. If any rule here conflicts with that file, **AGENTS.md** takes precedence.
55

66
## Coding Standards
7-
- Format with `go fmt ./...` and `goimports -w .`.
8-
- Lint with `golangci-lint run` and vet with `go vet ./...`.
9-
- Run `go test ./...` before committing.
7+
- Format with `magex format:fix`.
8+
- Lint with `magex lint` and vet with `magex vet`.
9+
- Run `magex test` before committing.
1010
- Follow Go naming and commenting conventions described in AGENTS.md.
1111

1212
## Commit Messages
@@ -22,8 +22,7 @@ All contributors must read `.github/AGENTS.md` for complete guidelines. If any r
2222
4. **Impact / Risk**
2323

2424
## Dependency Management
25-
- Manage modules with `go mod tidy` after import changes.
26-
- Run `make govulncheck` to check for vulnerabilities when dependencies change.
25+
- Manage modules with `magex tidy` after import changes.
2726

2827
## Security Reporting
2928
- Do not open public issues for vulnerabilities.

.devcontainer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"settings": {
1010
"editor.codeActionsOnSave": {
11-
"source.organizeImports": true
11+
"source.organizeImports": "explicit"
1212
},
1313
"editor.formatOnSave": true,
1414
"go.lintTool": "golangci-lint",
@@ -28,8 +28,9 @@
2828
"type=cache,target=/home/vscode/.cache/go-build",
2929
"type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock"
3030
],
31-
"name": "go-template dev container",
32-
"postCreateCommand": "make lint && go vet ./... && go test ./...",
31+
"name": "go-overlay-discovery-services dev container",
32+
"postCreateCommand": "magex lint && magex vet && magex test",
33+
"postStartCommand": "go install github.com/magefile/mage/cmd/magex@latest",
3334
"remoteUser": "vscode",
3435
"runArgs": [
3536
"--cap-drop=ALL",

.dockerignore

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,20 @@ __pycache__/
5454
.LSOverride
5555
._*
5656

57-
# Custom repo notes
58-
todo.md
59-
6057
# Temporary directories in the project
6158
bin
6259
tmp
63-
.golangci.yml
60+
61+
# Project files not needed in the container
62+
.cursorrules
63+
.editorconfig
64+
.github
65+
.gitpod.yml
6466
.golangci.json
67+
.golangci.yml
6568
.goreleaser.yml
66-
.editorconfig
67-
codecov.yml
69+
.vscode
70+
docs
6871
LICENSE
6972
README.md
73+
codecov.yml

.github/.env.base

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ ARTIFACT_DOWNLOAD_CONTINUE_ON_ERROR=false # Continue workflow execution even i
110110
BENCHMARK_TIMEOUT=20
111111

112112
# Benchmark mode (Options: quick, full, normal)
113-
BENCHMARK_MODE=quick
113+
BENCHMARK_MODE=quick
114114

115115
# Test Execution Timeouts
116116
TEST_TIMEOUT=30m # Go test timeout for standard tests
@@ -225,7 +225,7 @@ REDIS_CACHE_FORCE_PULL=false # Force pull Redis images even when cache
225225
# 🪄 MAGE-X CONFIGURATION
226226
# ================================================================================================
227227

228-
MAGE_X_VERSION=v1.7.5 # https://github.com/mrz1836/mage-x/releases
228+
MAGE_X_VERSION=v1.7.6 # https://github.com/mrz1836/mage-x/releases
229229
MAGE_X_AUTO_DISCOVER_BUILD_TAGS=true # Enable auto-discovery of build tags
230230
MAGE_X_AUTO_DISCOVER_BUILD_TAGS_EXCLUDE=race,custom # Comma-separated list of tags to exclude
231231
MAGE_X_FORMAT_EXCLUDE_PATHS=vendor,node_modules,.git,.idea # Format exclusion paths (comma-separated directories to exclude from formatting)
@@ -289,7 +289,7 @@ NANCY_VERSION=v1.0.51 # https://github.com/sonatype-nexus-commu
289289
# ================================================================================================
290290

291291
# Pre-Commit System
292-
GO_PRE_COMMIT_VERSION=v1.3.2 # https://github.com/mrz1836/go-pre-commit
292+
GO_PRE_COMMIT_VERSION=v1.3.4 # https://github.com/mrz1836/go-pre-commit
293293
GO_PRE_COMMIT_USE_LOCAL=false # Use local version for development
294294

295295
# System Settings

.github/SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 🔐 Security Policy
22

3-
Security is a priority. We maintain a proactive stance to identify and fix vulnerabilities in **go-overlay-discovery-service**.
3+
Security is a priority. We maintain a proactive stance to identify and fix vulnerabilities in **go-overlay-discovery-services**.
44

55
<br/>
66

@@ -73,4 +73,4 @@ To proactively protect this repository, we use several automated GitHub workflow
7373
- **[CodeQL Analysis](./workflows/codeql-analysis.yml)**: Scans the codebase for security vulnerabilities and coding errors using GitHub's CodeQL engine on every push and pull request to the `master` branch.
7474
- **[OpenSSF Scorecard](./workflows/scorecard.yml)**: Periodically evaluates the repository against OpenSSF Scorecard checks, providing insights and recommendations for improving supply chain security and best practices.
7575

76-
These workflows help us identify, remediate, and prevent security issues as early as possible in the development lifecycle. For more details, see the workflow files in the [`.github/workflows/`](https://github.com/bsv-blockchain/go-overlay-discovery-service/tree/master/.github/workflows) directory.
76+
These workflows help us identify, remediate, and prevent security issues as early as possible in the development lifecycle. For more details, see the workflow files in the [`.github/workflows/`](https://github.com/bsv-blockchain/go-overlay-discovery-services/tree/master/.github/workflows) directory.

.github/SUPPORT.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# 🛟 Support Guide
22

3-
Need help with **go-overlay-discovery-service**? You're in the right place. Here’s how to get support, report issues, and stay aligned with project guidelines.
3+
Need help with **go-overlay-discovery-services**? You're in the right place. Here’s how to get support, report issues, and stay aligned with project guidelines.
44

55
<br/>
66

77
## 💬 Questions & Discussion
88

99
Before asking, check the existing threads:
1010

11-
* 🔍 Search [Issues](https://github.com/bsv-blockchain/go-overlay-discovery-service/issues) or [Pull Requests](https://github.com/bsv-blockchain/go-overlay-discovery-service/pulls?q=is%3Apr+is%3Aopen+is%3Aclosed)
12-
* 🆕 Can’t find what you need? Start a [new issue](https://github.com/bsv-blockchain/go-overlay-discovery-service/issues/new?template=question.yml).
11+
* 🔍 Search [Issues](https://github.com/bsv-blockchain/go-overlay-discovery-services/issues) or [Pull Requests](https://github.com/bsv-blockchain/go-overlay-discovery-services/pulls?q=is%3Apr+is%3Aopen+is%3Aclosed)
12+
* 🆕 Can’t find what you need? Start a [new issue](https://github.com/bsv-blockchain/go-overlay-discovery-services/issues/new?template=question.yml).
1313

1414
<br/>
1515

1616
## 🐞 Reporting Issues
1717

1818
Found a bug?
1919

20-
1. Check the [issue tracker](https://github.com/bsv-blockchain/go-overlay-discovery-service/issues) to avoid duplicates.
20+
1. Check the [issue tracker](https://github.com/bsv-blockchain/go-overlay-discovery-services/issues) to avoid duplicates.
2121
2. If it’s new, open an issue with:
2222

2323
* Clear steps to reproduce

.gitpod.yml

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,54 @@
1-
# Gitpod workspace configuration for the local development environment.
2-
# This file creates a repeatable cloud development environment.
3-
# It ensures dependencies are installed and the codebase is vetted
4-
# and tested on workspace start.
1+
# Gitpod workspace configuration for go-overlay-discovery-services
2+
# Uses magex for build automation and development tasks
3+
# This creates a one-click development environment for contributors
54

6-
image:
7-
name: gitpod/workspace-full:1.0.0
5+
image: gitpod/workspace-go:latest
86

97
tasks:
108
- name: setup-and-test
119
init: |
12-
echo "Downloading Go modules..."
13-
go mod download
14-
go mod tidy
15-
# Install goimports if not present
16-
if ! command -v goimports >/dev/null; then
17-
go install golang.org/x/tools/cmd/goimports@latest
18-
fi
19-
go fmt ./...
20-
goimports -w .
21-
golangci-lint run
22-
go vet ./...
10+
echo "🚀 Setting up go-overlay-discovery-services development environment..."
11+
echo "📦 Installing MAGE-X build tool..."
12+
go install github.com/mrz1836/mage-x/cmd/magex@latest
13+
14+
echo "📥 Downloading dependencies..."
15+
magex deps:download
16+
17+
echo "🔧 Initial build..."
18+
magex build
19+
20+
echo "✅ Running initial tests..."
21+
magex test
22+
2323
command: |
24-
go test ./...
24+
echo "==============================================="
25+
echo "🎯 Welcome to go-overlay-discovery-services development!"
26+
echo "==============================================="
27+
echo ""
28+
echo "🛠️ Available magex commands:"
29+
echo " magex test - Run all tests"
30+
echo " magex lint - Run linters"
31+
echo " magex format:fix - Format the code"
32+
echo " magex build - Build the project"
33+
echo " magex help - List all available commands"
34+
echo ""
35+
echo "📖 Quick start:"
36+
echo " 1. Try: magex test"
37+
echo " 2. Make your changes"
38+
echo " 3. Run: magex format:fix && magex lint && magex test"
39+
echo " 4. Commit and push your changes"
40+
echo ""
41+
echo "💡 For more help: magex help"
42+
echo "==============================================="
2543
2644
ports:
2745
- port: 8080
28-
onOpen: open-preview
29-
description: Application
46+
onOpen: ignore
47+
description: Application (if needed)
3048

3149
vscode:
3250
extensions:
3351
- golang.go
3452
- github.vscode-pull-request-github
3553
- streetsidesoftware.code-spell-checker
54+
- eamodio.gitlens

.goreleaser.yml

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,20 @@ version: 2
66

77
before:
88
hooks:
9-
- make test
9+
- |
10+
sh -c '
11+
if [ "$SKIP_GORELEASER_TESTS" = "true" ]; then
12+
echo "Skipping tests (SKIP_GORELEASER_TESTS=true)"
13+
else
14+
magex test
15+
fi
16+
'
1017
changelog:
1118
sort: asc
1219
filters:
1320
exclude:
14-
- '^.github:'
15-
- '^.vscode:'
16-
- '^test:'
21+
- "^.vscode:"
22+
- "^test:"
1723

1824
# ---------------------------
1925
# Builder
@@ -27,6 +33,24 @@ builds:
2733
- darwin
2834
skip: true
2935

36+
# ---------------------------
37+
# Archives
38+
# ---------------------------
39+
archives:
40+
- id: go-overlay-discovery-services
41+
name_template: >-
42+
{{- .ProjectName }}_{{- .Version }}_{{- .Os }}_{{- .Arch }}
43+
files:
44+
- LICENSE
45+
- README.md
46+
47+
# ---------------------------
48+
# Checksum
49+
# ---------------------------
50+
checksum:
51+
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
52+
algorithm: sha256
53+
3054
# ---------------------------
3155
# Github Release
3256
# ---------------------------
@@ -38,31 +62,30 @@ release:
3862
# Announce
3963
# ---------------------------
4064
announce:
41-
4265
# See more at: https://goreleaser.com/customization/announce/#slack
4366
slack:
4467
enabled: false
45-
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Changelog: https://github.com/bsv-blockchain/{{ .ProjectName }}/releases/tag/{{ .Tag }}'
46-
channel: '#test_slack'
68+
message_template: "{{ .ProjectName }} {{ .Tag }} is out! Changelog: https://github.com/{{ .GitOwner }}/{{ .ProjectName }}/releases/tag/{{ .Tag }}"
69+
channel: "#test_slack"
4770
# username: ''
4871
# icon_emoji: ''
4972
# icon_url: ''
5073

5174
# See more at: https://goreleaser.com/customization/announce/#twitter
5275
twitter:
5376
enabled: false
54-
message_template: '{{ .ProjectName }} {{ .Tag }} is out!'
77+
message_template: "{{ .ProjectName }} {{ .Tag }} is out!"
5578

5679
# See more at: https://goreleaser.com/customization/announce/#discord
5780
discord:
5881
enabled: false
59-
message_template: '{{ .ProjectName }} {{ .Tag }} is out!'
82+
message_template: "{{ .ProjectName }} {{ .Tag }} is out!"
6083
# Defaults to `GoReleaser`
61-
author: ''
84+
author: ""
6285
# Defaults to `3888754` - the grey-ish from goreleaser
63-
color: ''
86+
color: ""
6487
# Defaults to `https://goreleaser.com/static/avatar.png`
65-
icon_url: ''
88+
icon_url: ""
6689

6790
# See more at: https://goreleaser.com/customization/announce/#reddit
6891
reddit:
@@ -72,6 +95,6 @@ announce:
7295
# Username for your Reddit account
7396
username: ""
7497
# Defaults to `{{ .GitURL }}/releases/tag/{{ .Tag }}`
75-
# url_template: 'https://github.com/bsv-blockchain/{{ .ProjectName }}/releases/tag/{{ .Tag }}'
98+
# url_template: 'https://github.com/{{ .GitOwner }}/{{ .ProjectName }}/releases/tag/{{ .Tag }}'
7699
# Defaults to `{{ .ProjectName }} {{ .Tag }} is out!`
77-
title_template: '{{ .ProjectName }} {{ .Tag }} is out!'
100+
title_template: "{{ .ProjectName }} {{ .Tag }} is out!"

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
"-.mage-cache"
8181
],
8282
"formatting.gofumpt": true,
83-
"formatting.local": "github.com/bsv-blockchain/go-overlay-discovery-service",
83+
"formatting.local": "github.com/bsv-blockchain/go-overlay-discovery-services",
8484
"symbolMatcher": "fastfuzzy",
8585
"symbolStyle": "full",
8686
"ui.completion.completeFunctionCalls": true,

.vscode/tasks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@
526526
"command": "go-pre-commit install",
527527
"detail": "Install go-pre-commit hooks",
528528
"group": "none",
529-
"label": "pre-commit: install",
529+
"label": "go-pre-commit: install",
530530
"presentation": {
531531
"clear": true,
532532
"focus": false,
@@ -540,7 +540,7 @@
540540
"command": "go-pre-commit run --all-files",
541541
"detail": "Run pre-commit hooks on all files",
542542
"group": "none",
543-
"label": "pre-commit: run",
543+
"label": "go-pre-commit: run",
544544
"presentation": {
545545
"clear": true,
546546
"focus": false,

0 commit comments

Comments
 (0)