import "github.com/gogits/gogs/modules/context" func MyHandler(ctx *context.Context) { // Get the "id" parameter as an int64 id, err := ctx.ParamsInt64(":id") if err != nil { // Handle error } // Do something with the ID }
import "github.com/gogits/gogs/modules/context" func MyHandler(ctx *context.Context) { // Get the "page" parameter as an int64 with a default value of 1 page := ctx.QueryInt64("page", 1) // Do something with the page value }In this example, we use the `QueryInt64` function to retrieve an integer parameter named "page" from the HTTP request query string. If the parameter isn't present in the query string, it will default to a value of 1. Overall, the `Context` package in the `github.com/gogits/gogs/modules/context` library is a package that provides a number of functions and types to help work with HTTP requests, including the `ParamsInt64` type for retrieving integer parameters.