mirror of
https://github.com/sanjeed5/awesome-cursor-rules-mdc.git
synced 2026-11-30 14:52:55 +08:00
add .mdc file
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
---
|
||||
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
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
---
|
||||
description: Provides additional instructions for implementing HTMX with Go, including semantic HTML, CSRF protection, and error handling.
|
||||
globs: **/*.html
|
||||
---
|
||||
- Use semantic HTML5 elements with HTMX attributes
|
||||
- Implement proper CSRF protection
|
||||
- Utilize HTMX extensions when needed
|
||||
- Use hx-boost for full page navigation
|
||||
- Follow Go's idiomatic error handling
|
||||
- Implement graceful shutdown for the server
|
||||
- Use Go modules for dependency management
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
---
|
||||
description: Specifies the recommended folder structure for a Go project using HTMX, including directories for commands, internal logic, templates, and static assets.
|
||||
globs: go.mod
|
||||
---
|
||||
- Use the following folder structure:
|
||||
cmd/
|
||||
main.go
|
||||
internal/
|
||||
handlers/
|
||||
models/
|
||||
templates/
|
||||
static/
|
||||
css/
|
||||
js/
|
||||
go.mod
|
||||
go.sum
|
||||
Reference in New Issue
Block a user