gogo

command module
v0.0.0-...-30be18a Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: Unlicense Imports: 10 Imported by: 0

README

gogo

介绍

针对http开发所使用的框架,模仿gin写的框架。 QQ群可讨论:6848027(GoLang/Go语言开发群)

软件架构

内部通过简单的封装实现基本的: http访问简化,请求http返回json数据,db数据库工厂模式,redis封装,缓存,日志,杀死进程软关闭

安装
  1. go get github.com/doujunyu/gogo
  2. go get gitee.com/doujunyu/gogo
使用说明

一个简单的实例,更多操作请看同级main.go包

r := gogo.ReadyGo()//生成配置
r.GET("/demo",func(j *job.Job){//j.w 和 j.r 是http.ResponseWriter和*http.Request
    j.Log.Error("ceshi","这是一个记录")//记录日志
    j.JsonSuccess(j.Input,"这是信息",0)//返回输出数据,什么都不填会返回code = 0,
})
r.Run(":7070")

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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