Categorygithub.com/cleango/gallop
modulepackage
1.0.0
Repository: https://github.com/cleango/gallop.git
Documentation: pkg.go.dev

# README

Gallop

Go gin 快速开发脚手架,本仓库的实现思路和部分代码多数来源于https://github.com/shenyisyn/goft-gin

Gallop主要是使用inject去贯传,这个项目并实现mvc架构,对gin进行封装。用于快速开发。

使用到的开源库,排名不分先后

  1. gin-gonic/gin https://gin-gonic.com/docs/
  2. spf13/viper https://github.com/spf13/viper
  3. facebookarchive/inject https://github.com/facebookarchive/inject
  4. jinzhu/copier https://github.com/jinzhu/copier.git
  5. goframe https://goframe.org/display/gf

系统配置说明

1.集成了日志zap组件,会以json对象输出

logger:
    type: file
    path: ./logs
    level: debug # 支持debug< info< warn< error< dpanic< panic< fatal
    stack: false # 当设置为true只有>=warn的等级才会显示stack

为了方便继承,我们增加了LogFiled属性,用户自定义日志输出如增加req_id

filed:=logger.LogField{}
filed["req_id"]="xxxxxxxxxxxxx"
logger.Info("1233",filed)
//输出: {"level":"INFO","ts":"2020-08-28 14:26:32","func":"controller/hello.go:20","msg":"1233","req_id":"xxxxxxxxxxxxx"}

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

AddJob 注入脚本,不支持.
No description provided by the author
DefaultOptions 初始化命令行参数.
No description provided by the author
Ignite 项目初始化.
InitFlags normalizes and parses the command line flags.
JobOneOption 对局属性.
MidFactory 构造函数.
No description provided by the author
RemoveJob 删除脚本.
No description provided by the author
No description provided by the author
WarnWordSepNormalizeFunc changes and warns for flags that contain "_" separators.
WordSepNormalizeFunc changes all flags that contain "_" separators.

# Constants

No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Options 配置项.

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author