Cursor · PluginsBackend#5
Go
HTTP APIs, error handling and context.
by Prompt Studio
go
Contents
Where it goes: .cursor/rules/go.mdc
---
description: Convenciones y buenas prácticas de Go
globs: **/*.go
alwaysApply: false
---
- Devuelve errores envueltos con `fmt.Errorf("...: %w", err)`; no uses `panic` para errores esperados.
- Pasa `context.Context` como primer parámetro en todo lo que haga I/O.
- Interfaces pequeñas definidas donde se consumen.
- Pruebas con tablas (`[]struct{...}`) y `t.Run`.
- Formatea con `gofmt` y pasa `go vet` y `staticcheck`.
More in Plugins
Next.js
App Router, Server Components, Server Actions and caching.
Python
Typing, package layout and tests with pytest.
React + TypeScript
Function components, hooks and strict typing.
Expo / React Native
Expo Router, styling and mobile performance.
Tailwind + shadcn/ui
Utility classes, design tokens and accessible components.
Ruby on Rails
Rails conventions, Hotwire and tests.