mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-06-15 04:31:27 +08:00
docs: add Spanish (es) translation (#2095)
Adds a complete Spanish translation of the ECC documentation under docs/es/, mirroring the Turkish (docs/tr/) translation in scope. 141 files covering agents, commands, rules, skills, contexts, examples, and core docs. Updates root README.md with the Spanish language link. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
28b78dd7bf
commit
ac0f11c640
@@ -0,0 +1,45 @@
|
||||
---
|
||||
paths:
|
||||
- "**/*.go"
|
||||
- "**/go.mod"
|
||||
- "**/go.sum"
|
||||
---
|
||||
# Patrones de Go
|
||||
|
||||
> Este archivo extiende [common/patterns.md](../common/patterns.md) con contenido específico de Go.
|
||||
|
||||
## Functional Options
|
||||
|
||||
```go
|
||||
type Option func(*Server)
|
||||
|
||||
func WithPort(port int) Option {
|
||||
return func(s *Server) { s.port = port }
|
||||
}
|
||||
|
||||
func NewServer(opts ...Option) *Server {
|
||||
s := &Server{port: 8080}
|
||||
for _, opt := range opts {
|
||||
opt(s)
|
||||
}
|
||||
return s
|
||||
}
|
||||
```
|
||||
|
||||
## Interfaces Pequeñas
|
||||
|
||||
Definir las interfaces donde se usan, no donde se implementan.
|
||||
|
||||
## Inyección de Dependencias
|
||||
|
||||
Usar funciones constructor para inyectar dependencias:
|
||||
|
||||
```go
|
||||
func NewUserService(repo UserRepository, logger Logger) *UserService {
|
||||
return &UserService{repo: repo, logger: logger}
|
||||
}
|
||||
```
|
||||
|
||||
## Referencia
|
||||
|
||||
Ver skill: `golang-patterns` para patrones completos de Go incluyendo concurrencia, manejo de errores y organización de paquetes.
|
||||
Reference in New Issue
Block a user