Egonex-AI/Understand-Anything / understand-anything-plugin/skills/understand
understand
VerifiedAnalyze a codebase to produce an interactive knowledge graph for understanding architecture, components, and relationships
languages/go.md
View on GitHub# Go Language Prompt Snippet
## Key Concepts
- **Goroutines**: Lightweight concurrent functions launched with `go` keyword
- **Channels**: Typed conduits for communication and synchronization between goroutines
- **Interfaces**: Implicitly satisfied contracts — no `implements` keyword needed
- **Struct Embedding**: Composition mechanism providing field and method promotion
- **Error Handling**: Explicit error return values (`error` interface) instead of exceptions
- **Defer/Panic/Recover**: Deferred cleanup, unrecoverable errors, and recovery mechanism
- **Slices vs Arrays**: Arrays are fixed-size values; slices are dynamic views backed by arrays
- **Pointers**: Explicit pointer types for pass-by-reference semantics (no pointer arithmetic)
- **Context Propagation**: `context.Context` carries deadlines, cancellation, and request-scoped values
- **Init Functions**: Package-level `init()` runs automatically before `main()` for setup
## Import Patterns
- `import "package"` — single package import
- `import alias "package"` — aliased import to avoid name conflicts
- `import ( ... )` — grouped import block (standard library, then external, then internal)
- `import _ "package"` — blank import for side effects only (e.g., driver registration)
## File Patterns
- `*_test.go` — test files in the same package (or `_test` package for black-box tests)
- `cmd/` — directory containing main packages (binary entry points)
- `internal/` — packages only importable by parent module (enforced by compiler)
- `pkg/` — public library packages (convention, not enforced)
- `go.mod` — module definition with dependency versions
- `go.sum` — cryptographic checksums for dependencies
## Common Frameworks
- **Gin** — High-performance HTTP framework with middleware support
- **Echo** — Minimalist web framework with built-in middleware
- **Fiber** — Express-inspired framework built on fasthttp
- **Chi** — Lightweight, composable HTTP router
- **GORM** — ORM library with associations, hooks, and migrations
## Example Language Notes
> Implements `io.Reader` interface implicitly — no explicit declaration needed, just
> matching method signatures. This enables any type with a `Read([]byte) (int, error)`
> method to be used wherever `io.Reader` is expected.
>
> The `internal/` directory enforces encapsulation at the compiler level, preventing
> external packages from importing implementation details — stronger than naming convention.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |