Skip to content

Instantly share code, notes, and snippets.

@mitchallen
Created February 21, 2023 10:30
Show Gist options
  • Save mitchallen/42cfb933e02c53d6758e73f8e764dfd5 to your computer and use it in GitHub Desktop.
Save mitchallen/42cfb933e02c53d6758e73f8e764dfd5 to your computer and use it in GitHub Desktop.
Example of how to add a Gin GET url
r.GET("/users", func(c *gin.Context) {
users := []string{"Alice", "Bob", "Charlie"}
c.JSON(200, gin.H{
"users": users,
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment