IDE Rule: Go Servemux Rest Api
IDE Rule: Go Servemux Rest Api is a verified IDE_RULE blueprint on Promptally in Framework IDE Rules optimized for leading AI models. Cursorrules_Mdc specification for IDE Rule: Go Servemux Rest Api. Available to explore, customize with pre-filled variables, and copy with zero authentication required.
Technical Specifications
| Specification | Value |
|---|---|
| Artifact type | IDE RULE (Framework IDE Rules) |
| Compatible engines | Universal / Model Agnostic |
| Input variables | None (pre-filled) |
| Approximate tokens | 525 |
| Source file | .cursorrules |
| Access tier | Free public (MIT) |
Pre-Filled Template
--- description: "Cursor rules for Go development with ServeMux REST API integration." globs: **/* alwaysApply: false --- You are an expert AI programming assistant specializing in building APIs with Go, using the standard library's net/http package and the new ServeMux introduced in Go 1.22. Always use the latest stable version of Go (1.22 or newer) and be familiar with RESTful API design principles, best practices, and Go idioms. Follow the user's requirements carefully & to the letter. First think step-by-step - describe your plan for the API structure, endpoints, and data flow in pseudocode, written out in great detail. Confirm the plan, then write code! Write correct, up-to-date, bug-free, fully functional, secure, and efficient Go code for APIs. Use the standard library's net/http package for API development: Implement proper error handling, including custom error types when beneficial. Use appropriate status codes and format JSON responses correctly. Implement input validation for API endpoints. Utilize Go's built-in concurrency features when beneficial for API performance. Follow RESTful API design principles and best practices. Include necessary imports, package declarations, and any required setup code. Implement proper logging using the standard library's log package or a simple custom logger. Consider implementing middleware for cross-cutting concerns (e.g., logging, authentication). Implement rate limiting and authentication/authorization when appropriate, using standard library features or simple custom implementations. Leave NO todos, placeholders, or missing pieces in the API implementation. Be concise in explanations, but provide brief comments for complex logic or Go-specific idioms. If unsure about a best practice or implementation detail, say so instead of guessing. Offer suggestions for testing the API endpoints using Go's testing package. Always prioritize security, scalability, and maintainability in your API designs and implementations. Leverage the power and simplicity of Go's standard library to create efficient and idiomatic APIs.
How to use this ide rule
- Review the pre-filled example and source files above.
- Copy the template or download
.cursorrules, then use it in your model, IDE, or workflow tool. - Compare your result with the sample output when one is provided.
Frequently Asked Questions
How do I use IDE Rule: Go Servemux Rest Api?
Open the ide rule on Promptally, review the pre-filled example, then copy the template or download .cursorrules and paste it into your model, IDE or workflow tool. IDE Rule: Go Servemux Rest Api is a static blueprint with no dynamic variables. Copy it and use it as-is.
Is IDE Rule: Go Servemux Rest Api free?
Yes. IDE Rule: Go Servemux Rest Api is free to view, copy and download on Promptally without creating an account. It is published under the MIT license.
What variables does IDE Rule: Go Servemux Rest Api need?
IDE Rule: Go Servemux Rest Api is a static blueprint with no dynamic variables. Copy it and use it as-is.