A powerful framework for faster, easier, and more efficient project development.
翻譯準備中
開發工具Go · ShellGitHub @gogf自行安裝營運者未確認
試用過了嗎? 點一下就好,不需要登入。
製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗English | 简体中文
GoFrame is a powerful framework for faster, easier, and more efficient project development.
Use it as a full application framework, or pick individual components as needed.
GoFrame requires Go 1.25 or later.
In an existing module, add the framework:
go get -u github.com/gogf/gf/v2
Install the gf CLI:
go install github.com/gogf/gf/cmd/gf/v2@latest
Create main.go:
package main
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
)
func main() {
s := g.Server()
s.BindHandler("/", func(r *ghttp.Request) {
r.Response.Write("Hello World!")
})
s.SetPort(8000)
s.Run()
}
Run it:
go mod init hello
go mod tidy
go run main.go
Open http://127.0.0.1:8000.
To scaffold a project with the gf CLI:
gf init hello
cd hello && gf run main.go
💖 Thanks to all the contributors who made GoFrame possible 💖
GoFrame is licensed under the MIT License, 100% free and open-source, forever.