Correct route

Report a typo

Select the correct route that would return the "hello" string as a response.

package main

import (
    "github.com/gin-gonic/gin"
    "net/http"
)

func main() {
    router := gin.Default()

    router.GET("/hey", heyHandler)
    router.GET("hello", helloHandler)
    router.GET("/hi", hiHandler)

    router.Run("127.0.0.1:9090")
}

func heyHandler(context *gin.Context) {
    context.String(http.StatusOK, "hi")
}

func helloHandler(context *gin.Context) {
    context.String(http.StatusOK, "hey")
}

func hiHandler(context *gin.Context) {
    context.String(http.StatusOK, "hello")
}
Select one option from the list
___

Create a free account to access the full topic