summaryrefslogtreecommitdiff
path: root/examples/basic.go
diff options
context:
space:
mode:
Diffstat (limited to 'examples/basic.go')
-rw-r--r--examples/basic.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/basic.go b/examples/basic.go
new file mode 100644
index 0000000..467460f
--- /dev/null
+++ b/examples/basic.go
@@ -0,0 +1,17 @@
+package examples
+
+import (
+ "log/slog"
+ "net/http"
+)
+
+// Big bungus function here!
+//
+//hh:route GET /admin/users, query: query, nextURL: hh.Cookie(r, "logout_next_url")
+func adminUsersForm(query struct {
+ search, year string
+ offset int
+}, w http.ResponseWriter) {
+ _, _ = w.Write([]byte("ahahaha"))
+ slog.Info("get admin users form", "search", query.search, "offset", query.offset)
+}