Giter Club home page Giter Club logo

isc-gobase's Introduction

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)
json json字符串处理工具
redis go-redis的封装
cache 缓存工具
time 时间管理工具
file 文件管理工具
coder 编解码加解密工具
http http的辅助工具
listener 事件监听机制
bean 对象管理工具
debug 线上调试工具统一介绍文档

isc-gobase 项目测试

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

sh go_test.sh

isc-gobase's People

Contributors

isyscore avatar simonalong avatar kuchensheng avatar rarnu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.