gae go gin

import (
    "net/http"

    "github.com/gin-gonic/gin"
)

func init() {
    r := gin.Default()
    r.GET("/", handler)
    http.Handle("/", r)
}

func handler(c *gin.Context) {
    code := c.Query("code") // /?code=12345
    c.String(200, code)
}