Beego
Full-stack Go web framework bundling routing, controllers, ORM, and configuration for rapid application building.
Official Documentation ↗v2. Check the official docs for the latest API surface.Installation
go get github.com/beego/beego/v2Methods
No methods match this filter.
Overview
Beego is a full-stack Go web framework bundling routing, controllers, an ORM, and configuration for rapid application building. This reference lists the most frequently used APIs with accurate signatures and runnable snippets.
Core APIs
web.Router— Registers a controller for a route, dispatching to its Get or Post methods.web.Controller— Base controller type whose methods map to HTTP verbs.web.Run— Starts the HTTP server using configured address and port.
Example
web.Router("/", &MainController{})
web.Run()
Notes
Controllers dispatch by method name, so verb-specific methods share one route. Configuration is file-driven, which differs from purely code-based setups.
Verification
Register a controller route, GET it, and confirm the response body matches what the Get method wrote.
Security notes
Quoted verbatim from the official documentation; this is not a complete threat model. 来源:https://beego.me/docs/intro/ · 取证方式:HTTP GET 官方 README/文档页(HTML 去标签) · 抓取时间:2026-11-07T13:48:29.211Z.
- Read More » Healthy Habits Your Pocket Guide to Wellbeing: Essential Daily Habits Unlock the secret to a happier, healthier you with our guide to simple daily habits. (https://beego.me/docs/intro/)
FAQ
- How do I map routes to HTTP verbs?
- Define methods such as Get, Post, and Delete on the controller; beego dispatches by the request method.
- How is configuration loaded?
- Beego reads conf/app.conf and environment-specific files, with values accessible through the config package.
- Does beego include an ORM?
- Yes. The orm package integrates with beego models and supports multiple databases through drivers.
Report a problem with this API docOpens a pre-filled issue on GitHub.