File contents Golang API Server
Priority: P0 (CRITICAL)
Router Selection
Standard Lib (net/http) : Use for simple services or zero-dependency requirements.
http.ServeMux (Go 1.22+) has method-based routing.
Echo (labstack/echo) : Recommended for production REST APIs with middleware, binding, and
error handling.
Gin (gin-gonic/gin) : High performance alternative.
Implementation Workflow
Choose router — Select based on complexity needs (stdlib for simple, Echo/Gin for
production).
Separate concerns — Handlers parse requests, call services, and format responses. No business
logic in handlers.
Add middleware — Use middleware for cross-cutting concerns (Logging, Recovery, CORS, Auth,
Tracing).
Include health endpoints — Always expose /health and /ready endpoints.
Enforce content types — Require application/json for REST APIs.
Implement graceful shutdown — Handle SIGINT/SIGTERM to drain in-flight requests.
See graceful shutdown example
and Echo handler patterns
Anti-Patterns
No business logic in handlers : Parse request, call service, format response only.
No global router vars : Pass router instance via constructor or DI.
No missing shutdown : Handle SIGTERM to drain in-flight requests.
References
Middleware Patterns
Graceful Shutdown
Source: li-lance/android-seraphim-framework — distributed by TomeVault .
1 --- 2 name: li-lance-android-seraphim-framework-golang-api-server 3 description: Golang API Server 4 --- 5 6 # Golang API Server 7 8 ## **Priority: P0 (CRITICAL)** 9 10 ## Router Selection 11 12 - **Standard Lib (`net/http`)**: Use for simple services or zero-dependency requirements. 13 `http.ServeMux` (Go 1.22+) has method-based routing. 14 - **Echo (`labstack/echo`)**: Recommended for production REST APIs with middleware, binding, and 15 error handling. 16 - **Gin (`gin-gonic/gin`)**: High performance alternative. 17 18 ## Implementation Workflow 19 20 1. **Choose router** — Select based on complexity needs (stdlib for simple, Echo/Gin for 21 production). 22 2. **Separate concerns** — Handlers parse requests, call services, and format responses. No business 23 logic in handlers. 24 3. **Add middleware** — Use middleware for cross-cutting concerns (Logging, Recovery, CORS, Auth, 25 Tracing). 26 4. **Include health endpoints** — Always expose `/health` and `/ready` endpoints. 27 5. **Enforce content types** — Require `application/json` for REST APIs. 28 6. **Implement graceful shutdown** — Handle SIGINT/SIGTERM to drain in-flight requests. 29 30 See [graceful shutdown example](references/graceful-shutdown.md) 31 and [Echo handler patterns](references/middleware-patterns.md) 32 33 ## Anti-Patterns 34 35 - **No business logic in handlers**: Parse request, call service, format response only. 36 - **No global router vars**: Pass router instance via constructor or DI. 37 - **No missing shutdown**: Handle SIGTERM to drain in-flight requests. 38 39 ## References 40 41 - [Middleware Patterns](references/middleware-patterns.md) 42 - [Graceful Shutdown](references/graceful-shutdown.md) 43 44 --- 45 > Source: [li-lance/android-seraphim-framework](https://github.com/li-lance/android-seraphim-framework) — distributed by [TomeVault](https://tomevault.io). 46 <!-- tomevault:4.0:skill_md:2026-06-16 -->
tomevault-io/skills-registry/tree/main/li-lance--android-seraphim-framework--golang-api-server commit 3898bbc421
Frequently asked questions How do I install the Li Lance Android Seraphim Framework Golang API Server skill? Run npx skillmds@latest add tomevault-io/li-lance-android-seraphim-framework-golang-api-server in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the Li Lance Android Seraphim Framework Golang API Server skill do? Golang API Server It is listed under Integrations & APIs on SkillMD.
Is Li Lance Android Seraphim Framework Golang API Server safe to use? This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with Li Lance Android Seraphim Framework Golang API Server? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is Li Lance Android Seraphim Framework Golang API Server free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published Li Lance Android Seraphim Framework Golang API Server? tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.