Get Request c.String() 1- GinGonic Golang Web Framwork

Here is Golang GinGonic Tutorial series


Get Request c.String() 1- GinGonic Golang Web Framwork

#Source Code#

// lets initialize module
// lets install gin-gonic
// go get -u
package main
// import gin-gonic
import ""
func main() {
    /// lets create default router/server
    r := gin.Default()
    // lets create our first get method
    // it takes 2 args... path/ url and function
    r.GET("/", func(c *gin.Context) {
        // now lets send data
        // first arg is status code , 200
        // 2nd arg is the data we want
        c.String(200, "Here is first server")
    r.Run() // to run the server
    // run project in console port is by default 8080


gin gonic tutorial
gin-gonic / examples
gin-gonic documentation
gin framework tutorial
gin web framework
gin router
golang gin context
gin router group

###Buy Me a Coffee

Tony BB

TonyBB is a Coach , marketer, hypnotist and a founder of RSKVF Production who specializes in providing simple, affordable, and easy to use solutions for Life.

Click Here to Leave a Comment Below 0 comments

Leave a Reply: