php/docs/build/cli/go/example.md
Snider 28d004ff61
Some checks failed
CI / PHP 8.4 (push) Failing after 1m54s
CI / PHP 8.3 (push) Failing after 1m58s
feat: replace Go CLI with PHP framework
Go CLI commands moved to core/go-php. This repo now contains
the Laravel modular monolith framework (previously php-framework).

- Remove all Go files (now in core/go-php)
- Add PHP framework: event-driven module loading, lifecycle events
- Composer package: core/php
- core/php-framework remains as-is for backward compat

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 08:49:51 +00:00

956 B

Go Examples

Testing

# Run all tests
core go test

# Specific package
core go test --pkg ./pkg/core

# Specific test
core go test --run TestHash

# With coverage
core go test --coverage

# Race detection
core go test --race

Coverage

# Summary
core go cov

# HTML report
core go cov --html

# Open in browser
core go cov --open

# Fail if below threshold
core go cov --threshold 80

Formatting

# Check
core go fmt

# Fix
core go fmt --fix

# Show diff
core go fmt --diff

Linting

# Check
core go lint

# Auto-fix
core go lint --fix

Installing

# Auto-detect cmd/
core go install

# Specific path
core go install ./cmd/myapp

# Pure Go (no CGO)
core go install --no-cgo

Module Management

core go mod tidy
core go mod download
core go mod verify
core go mod graph

Workspace

core go work sync
core go work init
core go work use ./pkg/mymodule