gbx

command
v1.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Command gbx 是 go-blackbox 脚手架的代码生成 CLI: 一键生成符合泰山版规范 + 安全基线的完整业务项目骨架。

用法(两种形式等价):

gbx new -name demo                    // 在当前目录生成 ./demo
gbx -name demo
gbx new -name demo -module github.com/connor/demo
gbx new -name demo -dir D:\projects

生成内容:

  • main.go:应用骨架(日志/Web/中间件安全基线/JWT 认证/健康检查/监控/Admin/迁移/数据权限)
  • internal/model:StandardModel 业务模型示例
  • internal/handler:业务 handler 示例(统一响应 + 错误码 + 数据权限)
  • go.mod / README.md / .gitignore

安装:go install github.com/Connorig/go-blackbox/tool/gbx 或直接:go run github.com/Connorig/go-blackbox/tool/gbx new -name demo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL