gf

gogfMIT活跃维护

GoFrame 是一套 Go 语言企业级开发框架,内置 ORM、日志、链路追踪和微服务组件,帮团队少拼装基础库、更快搭出稳定后端服务。

A powerful framework for faster, easier, and more efficient project development.

v2.10.4发布于 2026-10-28 02:41 UTC13,302star +3 / 7 天1,730fork同步于 2026-11-10 11:27 UTC

怎么上手

由 README 提炼,执行前请确认
go get -u github.com/gogf/gf/v2
go install github.com/gogf/gf/cmd/gf/v2@latest
硬件要求按 README 说明

README 未说明,仅要求 Go 1.25 或更高版本

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

GoFrame 是 Go 语言的全栈开发框架,可整体使用也可按需取用组件

GoFrame 是一套 Go 语言企业级开发框架,内置 ORM、日志、链路追踪和微服务组件,帮团队少拼装基础库、更快搭出稳定后端服务。

核心能力

  • 提供 ghttp 等组件,几行代码即可启动 HTTP 服务
  • 既可作完整应用框架,也可单独引入所需组件
  • 附带 gf CLI,可初始化项目脚手架并运行
  • 框架代码 100% 开源,采用 MIT 许可

容易踩的坑

需要 Go 1.25 或更高版本,低版本无法编译;示例服务默认监听 8000 端口,注意端口占用;使用 gf 命令前需先单独安装 CLI

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v2.10.4
  1. v2.10.4GoFrame Release v2.10.4最新正式版2026-10-28 · 2026-10-28 02:41 UTC

    What's Changed

    feat

    fix

  2. v2.10.3GoFrame Release v2.10.32026-08-26 · 2026-08-26 02:30 UTC
    查看更新说明

    What's Changed

  3. v2.10.2GoFrame Release v2.10.22026-05-14 · 2026-05-14 08:15 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/gogf/gf/compare/v2.10.1...v2.10.2

  4. v2.10.1GoFrame Release v2.10.12026-05-14 · 2026-05-14 05:43 UTC
    查看更新说明

    What's Changed

  5. v2.10.0GoFrame Release v2.10.02026-01-26 · 2026-01-26 12:53 UTC
    查看更新说明

    What's Changed

    Feature

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    English | 简体中文

    Go Reference GoFrame CI Code Coverage Production Ready License Ask DeepWiki

    Release GitHub pull requests GitHub closed pull requests GitHub issues GitHub closed issues Stars Forks

    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.

    Installation

    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
    

    Usage

    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
    

    Documentation

    Contributors

    💖 Thanks to all the contributors who made GoFrame possible 💖

    License

    GoFrame is licensed under the MIT License, 100% free and open-source, forever.