Created
February 21, 2023 10:30
-
-
Save mitchallen/42cfb933e02c53d6758e73f8e764dfd5 to your computer and use it in GitHub Desktop.
Example of how to add a Gin GET url
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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