Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
TypeScript antigravity-skillsbusiness-knowledgeclaude-codeclaude-skillscodebase-analysiscodexcodex-skillsdeveloper-tools-ai-agentgemini-cli-skillskarpathy-llm-wikiknowledge-baseknowledge-graphmemoryopencode-skillspi-agentunderstandcodevibe-coding
Go Language Prompt Snippet
Key Concepts
- Goroutines: Lightweight concurrent functions launched with
gokeyword - Channels: Typed conduits for communication and synchronization between goroutines
- Interfaces: Implicitly satisfied contracts — no
implementskeyword needed - Struct Embedding: Composition mechanism providing field and method promotion
- Error Handling: Explicit error return values (
errorinterface) 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.Contextcarries deadlines, cancellation, and request-scoped values - Init Functions: Package-level
init()runs automatically beforemain()for setup
Import Patterns
import "package"— single package importimport alias "package"— aliased import to avoid name conflictsimport ( ... )— 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_testpackage 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 versionsgo.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.Readerinterface implicitly — no explicit declaration needed, just matching method signatures. This enables any type with aRead([]byte) (int, error)method to be used whereverio.Readeris expected.The
internal/directory enforces encapsulation at the compiler level, preventing external packages from importing implementation details — stronger than naming convention.