-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.go
More file actions
29 lines (27 loc) · 754 Bytes
/
types.go
File metadata and controls
29 lines (27 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package forge
// Map is a convenience alias for map[string]interface{}
// Used for JSON responses and generic data structures.
//
// Example:
//
// app.Router().GET("/api/users", func(c Context) error {
// return c.JSON(200, Map{
// "users": []string{"alice", "bob"},
// "count": 2,
// "success": true,
// })
// })
type Map = map[string]any
// StringMap is a convenience alias for map[string]string
// Used for string-to-string mappings like headers, tags, or labels.
//
// Example:
//
// app.Router().POST("/config", func(c Context) error {
// config := StringMap{
// "env": "production",
// "region": "us-west-2",
// }
// return c.JSON(200, config)
// })
type StringMap = map[string]string