Files
main/rules-v0-deprecated/htmx-go-basic-cursorrules-prompt-file/htmx-and-go---best-practices.mdc
T
2025-03-03 23:40:27 +05:30

10 lines
433 B
Plaintext

---
description: Applies general best practices for using HTMX with Go, focusing on server-side rendering and request handling.
globs: **/*.go
---
- Use html/template for server-side rendering
- Implement http.HandlerFunc for handling HTMX requests
- Utilize gorilla/mux for routing if needed
- Use encoding/json for JSON responses
- Implement proper error handling and logging
- Utilize context for request cancellation and timeouts