构建一个下载电子书的网站
- item & list
- search
- category
- download
- hot
- save
- tag
- css分页和样式
- web框架:github.com/gin-gonic/gin
- sqlite3存储:github.com/mattn/go-sqlite3
- yaml配置解析:github.com/go-yaml/yaml
- 数据库orm:github.com/jinzhu/gorm
- 全局搜索:github.com/huichen/wukong
- 代码尽量使用全称呼不使用缩写,书名命名只有英文中文和下划线
- depth
- download: go get github.com/KyleBanks/depth/cmd/depth
- run: depth github.com/githubao/xiao-yuedu > dep.txt
- godepgraph
- download: go get github.com/kisielk/godepgraph
- run: godepgraph -s github.com/githubao/xiao-yuedu > dep.dot
- run: dot dep.dot -T png -o dep.png
- gometalinter
- download: go get github.com/alecthomas/gometalinter
- install: gometalinter --install --update
- run: gometalinter ./... -e 'should have comment' -e 'should be of the form' -e 'return value not checked' -e 'Errors unhandled' --skip vendor --deadline 600s > warn.txt
- golangci-lint
- download: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin vX.Y.Z
- run: golangci-lint run