MCPcopy Create free account
hub / github.com/vercel/examples / getData

Function getData

go/gin/main.go:77–89  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

75}
76
77func getData(c *gin.Context) {
78 items := []DataItem{
79 {ID: 1, Name: "Sample Item 1", Value: 100},
80 {ID: 2, Name: "Sample Item 2", Value: 200},
81 {ID: 3, Name: "Sample Item 3", Value: 300},
82 }
83
84 c.JSON(http.StatusOK, DataResponse{
85 Data: items,
86 Total: len(items),
87 Timestamp: time.Now().UTC().Format(time.RFC3339),
88 })
89}
90
91func getItem(c *gin.Context) {
92 id := c.Param("id")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected