Giter Club home page Giter Club logo

miniblog's Introduction

miniblog 项目(参照 github.com/marmotedu)

添加 LICENSE 文件

使用 license 工具来生成

go install github.com/nishanths/license/v5@latest
license -list # 查看支持的代码协议
license -n 'ra1n6ow <[email protected]>' -o LICENSE mit # 在 miniblog 项目根目录下执行
ls LICENSE 
LICENSE

给源文件添加版本声明

miniblog 的版权头信息保存在 scripts/boilerplate.txt 文件中。

go install github.com/marmotedu/addlicense@latest
# 给当前目录下的所有文件添加头信息
addlicense -v -f ./scripts/boilerplate.txt --skip-dirs=third_party,vendor,_output .

air 动态构建运行

go install github.com/cosmtrek/air@latest

# 运行
air [-c .air.toml]

根据数据表生成结构体

# 安装db2struct 工具
go install github.com/Shelnutt2/db2struct/cmd/db2struct

# 进入生成文件的目录 cd miniblog/internal/pkg/model
db2struct --gorm --no-json -H 127.0.0.1 -d miniblog -t user --package model --struct UserM -u root -p '123456' --target=user.go
db2struct --gorm --no-json -H 127.0.0.1 -d miniblog -t post --package model --struct PostM -u root -p '123456' --target=post.go

miniblog's People

Contributors

ra1n6ow 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.