Categorygithub.com/isyscore/isc-gobase
module
1.5.4
Repository: https://github.com/isyscore/isc-gobase.git
Documentation: pkg.go.dev

# README

CI

isc-gobase

isc-gobase 框架是杭州指令集智能科技有限公司在java转go的实践中沉淀总结的一套至简化工具框架。遵从大道至简原则,让开发者在开发go的项目方面使用更简单

下载

go get github.com/isyscore/isc-gobase

提示:更新相关依赖

go mod tidy

快速入门

isc-gobase定位是工具框架,包含各种各样的工具,并对开发中的各种常用的方法进行封装。也包括web方面的工具

web项目

创建main.go文件和同目录的application.yml 文件

├── application.yaml
├── go.mod
└── main.go
# application.yml 内容
base:
  server:
    # 是否启用,默认:false
    enable: true
// main.go 文件
package main

import (
    "github.com/gin-gonic/gin"
    "github.com/isyscore/isc-gobase/server"
    "github.com/isyscore/isc-gobase/server/rsp"
)

func main() {
    server.Get("api/get", GetData)
    server.Run()
}

func GetData(c *gin.Context) {
    rsp.SuccessOfStandard(c, "value")
}

运行如下

root@user ~> curl http://localhost:8080/api/get
{"code":0,"data":"value","message":"success"}

包列表

包名简介
isc基础工具(更新中)
config配置文件管理
validate校验核查
logger日志
database数据库处理(待更新)
server服务处理
goid局部id传递处理(theadlocal)
jsonjson字符串处理工具
cache缓存工具
time时间管理工具
file文件管理工具
coder编解码加解密工具
httphttp的辅助工具
listener事件监听机制
bean对象管理工具
debug线上调试工具统一介绍文档
extend/ormgorm、xorm的封装
extend/etcdetcd封装
extend/redisgo-redis的封装
extend/emqxemqx客户端的封装

isc-gobase 项目测试

根目录提供go_test.sh文件,统一执行所有gobase中包的测试模块

sh go_test.sh

# 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
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
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
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
No description provided by the author