Skip to content

Commit b150dff

Browse files
authored
Initial commit
0 parents  commit b150dff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+4952
-0
lines changed

.cursorrules

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Cursor Rules derived from .github/AGENTS.md
2+
3+
## Read AGENTS.md First
4+
All contributors must read `.github/AGENTS.md` for complete guidelines. If any rule here conflicts with that file, **AGENTS.md** takes precedence.
5+
6+
## 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.
10+
- Follow Go naming and commenting conventions described in AGENTS.md.
11+
12+
## Commit Messages
13+
- Use the format `<type>(<scope>): <imperative short description>`.
14+
- Types include `feat`, `fix`, `docs`, `test`, `refactor`, `chore`, `build`, `ci`.
15+
16+
## Pull Requests
17+
- Title format: `[Subsystem] Imperative and concise summary of change`.
18+
- Description must include the sections:
19+
1. **What Changed**
20+
2. **Why It Was Necessary**
21+
3. **Testing Performed**
22+
4. **Impact / Risk**
23+
24+
## Dependency Management
25+
- Manage modules with `go mod tidy` after import changes.
26+
- Run `make govulncheck` to check for vulnerabilities when dependencies change.
27+
28+
## Security Reporting
29+
- Do not open public issues for vulnerabilities.
30+
- Follow `SECURITY.md` for responsible disclosure.

.devcontainer/devcontainer.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
// Human-readable name that shows up in both VS Code and GoLand
3+
"name": "go-template dev container",
4+
5+
// Official Go 1.24 Bullseye image maintained by the Dev Containers team
6+
"image": "mcr.microsoft.com/devcontainers/go:0-1.24-bullseye",
7+
8+
// Dev Container “features” – extra tooling installed declaratively
9+
"features": {
10+
// GitHub CLI for release automation / CODEOWNERS triage
11+
"ghcr.io/devcontainers/features/github-cli:1": {},
12+
13+
// golangci-lint (matches your repo's Makefile / CI)
14+
"ghcr.io/devcontainers/features/golangci-lint:2": { "version": "2.2.0" },
15+
16+
// Secure Docker-outside-of-Docker so you can build/publish images from inside the container
17+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
18+
},
19+
20+
// Handy mounts (build cache + host Docker socket)
21+
"mounts": [
22+
"type=cache,target=/home/vscode/.cache/go-build",
23+
"type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock"
24+
],
25+
26+
// Drop all Linux caps and block “sudo bash” style privilege escalation
27+
"runArgs": [
28+
"--cap-drop=ALL",
29+
"--security-opt", "no-new-privileges:true"
30+
],
31+
32+
// Recommended post-create sanity check: vet and full test suite
33+
"postCreateCommand": "go vet ./... && go test ./...",
34+
35+
// IDE-specific tweaks
36+
"customizations": {
37+
"vscode": {
38+
"settings": {
39+
"go.useLanguageServer": true,
40+
"go.lintTool": "golangci-lint",
41+
"go.toolsEnvVars": { "GOFLAGS": "-buildvcs=false" },
42+
"editor.formatOnSave": true,
43+
"editor.codeActionsOnSave": { "source.organizeImports": true }
44+
},
45+
"extensions": [
46+
"golang.Go",
47+
"github.vscode-github-actions",
48+
"eamodio.gitlens"
49+
]
50+
}
51+
// GoLand reads the same settings automatically; no extra block needed
52+
},
53+
54+
// Keep using the non-root “vscode” user created by the base image
55+
"remoteUser": "vscode"
56+
}

.dockerignore

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
##
2+
## Specific to .dockerignore
3+
##
4+
5+
.git/
6+
Dockerfile
7+
contrib/
8+
9+
##
10+
## Common with .gitignore
11+
##
12+
13+
# Temporary files
14+
*~
15+
*#
16+
.#*
17+
18+
# Vendors
19+
node_modules/
20+
vendor/
21+
22+
# Binaries for programs and plugins
23+
dist/
24+
gin-bin
25+
*.exe
26+
*.exe~
27+
*.dll
28+
*.so
29+
*.dylib
30+
31+
# Byte-compiled / optimized / DLL files
32+
__pycache__/
33+
**/__pycache__/
34+
*.pyc
35+
*.pyo
36+
*.pyd
37+
.Python
38+
*.py[cod]
39+
*$py.class
40+
.pytest_cache/
41+
..mypy_cache/
42+
43+
# Test binary, build with `go test -c`
44+
*.test
45+
46+
# Output of the go coverage tool, specifically when used with LiteIDE
47+
*.out
48+
49+
# Virtual environments
50+
.venv
51+
../venv
52+
.DS_Store
53+
.AppleDouble
54+
.LSOverride
55+
._*
56+
57+
# Custom repo notes
58+
todo.md
59+
60+
# Temporary directories in the project
61+
bin
62+
tmp
63+
.golangci.yml
64+
.golangci.json
65+
.goreleaser.yml
66+
.editorconfig
67+
codecov.yml
68+
LICENSE
69+
README.md

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# EditorConfig helps maintain consistent coding styles
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
indent_style = tab
8+
indent_size = 4
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.gitattributes

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Enforce Unix-style line endings for all files
2+
* text=auto eol=lf
3+
4+
# Go source files
5+
*.go text
6+
*.mod text
7+
*.sum text
8+
9+
# Treat binary files appropriately
10+
*.png binary
11+
*.jpg binary
12+
*.gif binary
13+
*.svg text

.github/.gitleaks.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
title = "go-template gitleaks config"
2+
3+
[allowlist]
4+
description = "global allow list"
5+
files = []
6+
paths = [
7+
'''(?i)\.(?:bmp|gif|jpe?g|png|svg|tiff?)$''',
8+
'''(?i)\.(?:eot|[ot]tf|woff2?)$''',
9+
'''(?i)\.(?:docx?|xlsx?|pdf|bin|socket|vsidx|v2|suo|wsuo|dll|pdb|exe|gltf)$''',
10+
]
11+
regexes = []
12+
stopwords = []
13+
commits = []
14+
15+
[[rules]]
16+
id = "github-pat"
17+
description = "GitHub personal access token"
18+
regex = '''gh[pous]_[0-9A-Za-z]{36,255}'''
19+
tags = ["github", "token"]

0 commit comments

Comments
 (0)