Last active
July 19, 2022 07:19
-
-
Save nidhi-canopas/f7f05d73881599b139eeef3c8815bab8 to your computer and use it in GitHub Desktop.
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
| func HelloWorld(c *gin.Context) { | |
| text := c.DefaultQuery("txt", "Hey Go dev!!") | |
| c.JSON(http.StatusOK, gin.H{"greeting": text}) | |
| } | |
| // endpoint | |
| r.GET("/hello", HelloWorld) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment