```go
package main
import (
"net/http"
"github.com/gin-gonic/gin"
)
// Model
type User struct {
Name string `json:"name"`
Age int `json:"age"`
}
// Controller
func GetUser(c *gin.Context) {
name := c.Param("name")
user := User{
Name: name,
Age: 18,
}
c.JSON(http.StatusOK, user)
}
func main() {
router := gin.Default()
router.GET("/user/:name", GetUser)
router.Run()
}