Git Product home page Git Product logo

go-tools's Introduction

go-tools简介

go-tools是一个golang工具组件库,包含了一些个人在项目开发过程中总结的一些常用的工具函数和组件。

组件列表:

  • codeGen 代码生成工具
  • conc 简单的并发控制组件
  • conf 配置文件读取组件
  • dbClient 数据库组件
  • excel 简单读写excel组件
  • gast 语法树工具
  • gcontext 上下文工具组件
  • gerror 错误处理组件
  • glog 日志组件
  • gutils 一些常用的工具函数
  • jwtAuth jwt鉴权组件
  • rateLimit 限流组件

安装

go get github.com/morehao/go-tools

组件使用说明

codeGen

简介

codeGen 是一个简单的代码生成工具,通过读取数据库表结构,支持生成基础的CRUD代码,router、controller、service、dto、model、errorCode等代码。

特性

  • 支持MySQL数据库
  • 支持模板自定义和模板参数自定义
  • 支持基于模板生成代码

使用

使用示例参照codeGen单测

excel

简介

excel 是基于 excelize 的简单封装,支持通过结构体便捷地读写 Excel 文件。

无论是读取 Excel 还是写入 Excel,都需要定义一个结构体,结构体的字段通过 tag(即 ex)来指定 Excel 的相关信息。

特性

  • 通过结构体标签定义Excel列映射关系
  • 支持读取和写入Excel文件
  • 支持基于validator的数据验证

安装

go get github.com/morehao/go-tools

使用

使用示例参照excel使用说明

go-tools's People

Contributors

morehao avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.