Skip to content

Commit cda93f9

Browse files
committed
feat: add comprehensive Go implementation with feature parity to JavaScript
- Add new Go tool detector and config wizard following JavaScript patterns - Create 9 Go commands with consistent naming (go- prefix) - Update existing Go commands to use new modular command runner - Add missing commands: go-clean, go-security, go-run - Rename commands for consistency: go-fmt → go-format, go-deps → go-mod - Remove old Go implementation files (languages/go/, scripts/go/) - Update documentation and README references - Update test files to use new implementation - All 9 Go commands now match JavaScript feature set: • go-setup - Configure Go projects • go-build - Build with cross-compilation • go-test - Run tests with coverage • go-lint - Lint code with multiple tools • go-format - Format code (renamed from go-fmt) • go-mod - Manage modules (renamed from go-deps) • go-security - Security scanning • go-run - Run Go programs • go-clean - Clean build artifacts
1 parent dfcc1bd commit cda93f9

48 files changed

Lines changed: 3727 additions & 5645 deletions

Some content is hidden

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

GO-INTEGRATION.md

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,12 @@ Lint code with multiple linter support and auto-fix capabilities.
127127
/go-lint --timeout 10m
128128
```
129129

130-
### `/go-fmt`
130+
### `/go-format`
131131

132132
Format code with import organization and simplification.
133133

134134
```bash
135-
/go-fmt [options] [paths...]
135+
/go-format [options] [paths...]
136136
```
137137

138138
**Options:**
@@ -146,17 +146,17 @@ Format code with import organization and simplification.
146146
**Examples:**
147147

148148
```bash
149-
/go-fmt --write
150-
/go-fmt --check
151-
/go-fmt --formatter goimports --write
149+
/go-format --write
150+
/go-format --check
151+
/go-format --formatter goimports --write
152152
```
153153

154-
### `/go-deps`
154+
### `/go-mod`
155155

156-
Manage dependencies with security auditing and update management.
156+
Manage Go modules with security auditing and update management.
157157

158158
```bash
159-
/go-deps [action] [options]
159+
/go-mod [action] [options]
160160
```
161161

162162
**Actions:**
@@ -173,10 +173,10 @@ Manage dependencies with security auditing and update management.
173173
**Examples:**
174174

175175
```bash
176-
/go-deps tidy
177-
/go-deps security
178-
/go-deps update-all
179-
/go-deps why github.com/pkg/errors
176+
/go-mod tidy
177+
/go-mod security
178+
/go-mod update-all
179+
/go-mod why github.com/pkg/errors
180180
```
181181

182182
## Project Types
@@ -295,12 +295,7 @@ project/
295295
"build": {
296296
"flags": [],
297297
"ldflags": [],
298-
"targets": [
299-
"linux/amd64",
300-
"darwin/amd64",
301-
"darwin/arm64",
302-
"windows/amd64"
303-
]
298+
"targets": ["linux/amd64", "darwin/amd64", "darwin/arm64", "windows/amd64"]
304299
}
305300
}
306301
}
@@ -435,7 +430,7 @@ GOOS=linux GOARCH=amd64 CGO_ENABLED=0 /go-build
435430
### Dependency Auditing
436431

437432
```bash
438-
/go-deps security
433+
/go-mod security
439434
```
440435

441436
**Checks:**
@@ -495,7 +490,7 @@ jobs:
495490
- uses: actions/setup-go@v4
496491
- run: /go-test --coverage --race
497492
- run: /go-lint
498-
- run: /go-fmt --check
493+
- run: /go-format --check
499494
500495
build:
501496
runs-on: ubuntu-latest
@@ -509,7 +504,7 @@ jobs:
509504
steps:
510505
- uses: actions/checkout@v3
511506
- uses: actions/setup-go@v4
512-
- run: /go-deps security
507+
- run: /go-mod security
513508
```
514509

515510
### GitLab CI
@@ -526,7 +521,7 @@ go-test:
526521
script:
527522
- /go-test --coverage
528523
- /go-lint
529-
- /go-fmt --check
524+
- /go-format --check
530525
531526
go-build:
532527
stage: build
@@ -541,7 +536,7 @@ go-security:
541536
stage: security
542537
image: golang:1.21
543538
script:
544-
- /go-deps security
539+
- /go-mod security
545540
```
546541

547542
## Error Handling
@@ -608,13 +603,13 @@ WARNING: DATA RACE
608603
### 3. Code Quality
609604

610605
- Run `/go-lint --fix` regularly
611-
- Use `/go-fmt --check` in CI
606+
- Use `/go-format --check` in CI
612607
- Enable race detector in tests
613608
- Audit dependencies monthly
614609

615610
### 4. Security
616611

617-
- Run `/go-deps security` in CI
612+
- Run `/go-mod security` in CI
618613
- Use `gosec` for code scanning
619614
- Keep dependencies updated
620615
- Review vulnerability reports
@@ -638,7 +633,7 @@ go mod init github.com/user/project
638633
go mod tidy
639634

640635
# Verify migration
641-
/go-deps verify
636+
/go-mod verify
642637
```
643638

644639
### From Dep to Go Modules
@@ -664,7 +659,7 @@ rm -rf vendor/
664659
go mod init
665660

666661
# Let Go manage dependencies
667-
/go-deps tidy
662+
/go-mod tidy
668663
```
669664

670665
## Examples
@@ -737,7 +732,7 @@ go env
737732

738733
### Adding New Tools
739734

740-
1. Add tool detection to `languages/go/tool-detector.js`
735+
1. Add tool detection to `languages/golang/tool-detector.js`
741736
2. Update installation guides
742737
3. Add configuration options
743738
4. Update documentation
@@ -762,7 +757,7 @@ go env
762757
/go-lint
763758

764759
# Check formatting
765-
/go-fmt --check
760+
/go-format --check
766761
```
767762

768763
## Resources

INTEGRATION-GUIDE.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,11 @@ everything-opencode/
8787
- **/go-build** - Build Go projects with cross-compilation for 5 platforms and race detection
8888
- **/go-test** - Run comprehensive tests with coverage, benchmarks, and race detection
8989
- **/go-lint** - Lint code with multiple linter support (golangci-lint, staticcheck, revive)
90-
- **/go-fmt** - Format code with gofmt/goimports and formatting checks
91-
- **/go-deps** - Manage dependencies with security auditing and update management
90+
- **/go-format** - Format code with gofmt/goimports and formatting checks
91+
- **/go-mod** - Manage modules with security auditing and update management
92+
- **/go-clean** - Clean build artifacts and cache
93+
- **/go-run** - Run Go programs with enhanced features
94+
- **/go-security** - Security scanning for Go code and dependencies
9295

9396
#### Elixir Commands
9497

@@ -259,9 +262,9 @@ toolName: {
259262

260263
```javascript
261264
// Check for project type markers
262-
const hasMarkers = await checkPythonProjectType(projectPath, "new-type", [
263-
"import newframework",
264-
"from newframework import",
265+
const hasMarkers = await checkPythonProjectType(projectPath, 'new-type', [
266+
'import newframework',
267+
'from newframework import',
265268
]);
266269
```
267270

LANGUAGE-ADDITION-GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ node scripts/commands/{language}-test.js --help
827827
Study these existing implementations for reference:
828828

829829
- **JavaScript/TypeScript**: `languages/javascript/`, `scripts/javascript/`
830-
- **Go**: `languages/go/`, `scripts/go/`
830+
- **Go**: `languages/golang/`, `scripts/golang/`
831831
- **Python**: `languages/python/`, `scripts/commands/python-*.js`
832832
- **Elixir**: `languages/elixir/`, `scripts/elixir/`
833833
- **PineScript**: `languages/pinescript/`, `scripts/pinescript/`

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ This repository is a **converted version** of [everything-claude-code](https://g
4242

4343
**Documentation Coverage:**
4444

45-
-**Go documentation**: Added 4 missing command docs (`go-deps`, `go-fmt`, `go-lint`, `go-test`)
45+
-**Go documentation**: Added comprehensive command docs (`go-mod`, `go-format`, `go-lint`, `go-test`, `go-clean`, `go-run`, `go-security`)
4646
-**Elixir documentation**: Created 7 comprehensive command docs (previously zero)
4747
-**PineScript documentation**: Added `pine-debug` documentation
4848
-**Standardized format**: Consistent documentation structure across all languages
@@ -117,7 +117,7 @@ The plugin includes intelligent language tool detection with **cross-platform pa
117117
node languages/python/tool-detector.js
118118

119119
# Check Go installation
120-
node scripts/go/command-runner.js --check
120+
node scripts/golang/command-runner.js --check
121121

122122
# Get platform-specific installation help
123123
node scripts/lib/platform-detector.js --help
@@ -184,8 +184,11 @@ everything-opencode/
184184
| |-- pine-debug.md # /pine-debug - Debug PineScript with AI-assisted analysis
185185
| |-- go-setup.md # /go-setup - Configure Go project with Go-specific improvements
186186
| |-- go-build.md # /go-build - Build Go projects with cross-compilation
187-
| |-- go-deps.md # /go-deps - Manage Go dependencies with security auditing
188-
| |-- go-fmt.md # /go-fmt - Format Go code with multiple formatters
187+
| |-- go-mod.md # /go-mod - Manage Go modules with security auditing
188+
| |-- go-format.md # /go-format - Format Go code with multiple formatters
189+
| |-- go-clean.md # /go-clean - Clean build artifacts and cache
190+
| |-- go-run.md # /go-run - Run Go programs with enhanced features
191+
| |-- go-security.md # /go-security - Security scanning for Go code and dependencies
189192
| |-- go-lint.md # /go-lint - Lint Go code with golangci-lint/staticcheck
190193
| |-- go-test.md # /go-test - Run Go tests with coverage and race detection
191194
| |-- elixir-setup.md # /elixir-setup - Configure Elixir project with Elixir-specific improvements

commands/go-build.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ Error: cannot find module providing package github.com/example/pkg
232232
**Fix:**
233233

234234
```bash
235-
/go-deps tidy
235+
/go-mod tidy
236236
# or
237237
go get github.com/example/pkg
238238
```
@@ -269,7 +269,7 @@ Error: missing go.sum entry for module
269269
**Fix:**
270270

271271
```bash
272-
/go-deps tidy
272+
/go-mod tidy
273273
# or
274274
go mod download
275275
```
@@ -364,8 +364,11 @@ clean-build:
364364
- `/go-setup` - Configure Go project
365365
- `/go-test` - Run Go tests
366366
- `/go-lint` - Lint Go code
367-
- `/go-fmt` - Format Go code
368-
- `/go-deps` - Manage dependencies
367+
- `/go-format` - Format Go code
368+
- `/go-mod` - Manage modules
369+
- `/go-clean` - Clean build artifacts
370+
- `/go-run` - Run Go programs
371+
- `/go-security` - Security scanning
369372
- [Go Build Command](https://pkg.go.dev/cmd/go#hdr-Compile_packages_and_dependencies)
370373
- [Cross-compilation Guide](https://go.dev/doc/install/source#environment)
371374
- [Build Constraints](https://pkg.go.dev/go/build#hdr-Build_Constraints)

0 commit comments

Comments
 (0)