Giter Club home page Giter Club logo

project-template's Introduction

Project Template

这是一个简单的golang web项目的目录结构,内置了一些常用的模块和标准了结构.
如果你需要开启一个新的web项目,可以clone然后再修改

工程根目录
.
├── Makefile    # 编译脚本
|-- bin         # 编译后的产物
├── cmd         # 项目的入口文件
├── internal    # 内部代码,比如说一些service
├── pkg         # 一些公共代码,随模板一起发布的
├── http        # web项目的逻辑入口,控制器、中间件、路由都在这里面定义
├── go.mod
├── go.sum
├── readme.md

Feature

  1. viper (配置)
  2. sqlx (数据库)
  3. zap (日志)
  4. jwt (鉴权)
  5. cors (跨域)
  6. snowflake(唯一id生成)
  7. 一些常用的数据结构

如何开始

  1. 复制本仓库中的setup_project.sh文件到你本地
  2. chmod +x setup_project.sh
  3. ./setup_project.sh
  4. 根据提示操作

记录一些常用的包

golang版的loadsh (https://github.com/samber/lo)
很方便的集合操作库 (https://github.com/deckarep/golang-set)
微信接口封装 (https://github.com/silenceper/wechat)

project-template's People

Contributors

mztlive avatar

Stargazers

B avatar

Watchers

 avatar  avatar

project-template's Issues

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.