func ExampleMiddleware(c *gin.Context) { userID := "123" c.Set("userID", userID) c.Next() }
func ExampleHandler(c *gin.Context) { userID := c.MustGet("userId").(string) // do something with the userID }By using `MustGet()`, we are able to retrieve the value from the context without checking for errors. If the value does not exist, the function will panic. Overall, the `Context.MustGet()` function is a useful tool for accessing values stored in the context across middleware functions and handlers.