Build production-grade REST APIs with Go and Gin. This skill covers the 80% of patterns you need daily: server setup, routing, request binding, response formatting, and error handling.
Use internal/ for code that must not be imported by other modules. Use pkg/ for reusable middleware and utilities.
Architecture note: In clean architecture, domain entities should not carry json or binding tags. Use separate request/response DTOs in the delivery layer. See golang-gin-clean-arch Golden Rule 4.
Go Gin 프레임워크로 REST API를 구축하세요. 라우팅, 핸들러 패턴, 요청 바인딩/검증, 미들웨어 체인, 오류 처리, 보안 헤더(OWASP), CORS, 시간 초과 미들웨어 및 계층화된 프로젝트 구조를 다룹니다. Go 웹 서버, REST 엔드포인트, HTTP 핸들러를 생성하거나 Gin 프레임워크로 작업할 때 사용합니다. 또한 사용자가 Go에서 Gin 경로, 미들웨어, JSON 응답, 요청 구문 분석 또는 API 구조를 언급할 때 활성화됩니다. 출처: henriqueatila/golang-gin-best-practices.