https://github.com/gothinkster/golang-gin-realworld-example-app/blob/master/users/models.go 模型定义 users/models.go package users import ( "errors" "github.com/jinzhu/gorm" "github.com/wangzitian0/golang-gin-starter-kit/common"…
https://github.com/gothinkster/golang-gin-realworld-example-app/blob/master/common/unit_test.go 单元测试 package users import ( "testing" "github.com/stretchr/testify/assert" "bytes" "fmt" "github.com/jinzhu/gorm&q…
https://github.com/gothinkster/golang-gin-realworld-example-app/blob/master/hello.go main调用 package main import ( "fmt" "gopkg.in/gin-gonic/gin.v1" "github.com/jinzhu/gorm" "github.com/wangzitian0/golang-gin-starter-kit/…
https://github.com/gothinkster/golang-gin-realworld-example-app/blob/master/users/validators.go 验证器 package users import ( "github.com/gin-gonic/gin" "github.com/wangzitian0/golang-gin-starter-kit/common" ) // 模型验证器包括2个方面: 1. 使用规则验证输入的…
https://github.com/gothinkster/golang-gin-realworld-example-app/blob/master/users/middlewares.go 中间件定义 package users import ( "net/http" "strings" "github.com/dgrijalva/jwt-go/request" "github.com/gin-gonic/gin" &qu…
https://github.com/gothinkster/golang-gin-realworld-example-app/blob/master/users/routers.go 路由定义 package users import ( "errors" "net/http" "github.com/gin-gonic/gin" "github.com/wangzitian0/golang-gin-starter-kit/commo…
https://github.com/gothinkster/golang-gin-realworld-example-app/blob/master/users/serializers.go 序列化定义 package users import ( "gopkg.in/gin-gonic/gin.v1" "github.com/wangzitian0/golang-gin-starter-kit/common" ) // 用户简介序列化结构体 type Profi…
https://wangzitian0.github.io/2013/06/29/zero-to-one-1/ https://github.com/gothinkster/golang-gin-realworld-example-app 目录结构 golang-gin-realworld-example-app/ ├── articles │   ├── doc.go │   ├── models.go │   ├── routers.go │   ├── serializers.go │  …
前言:接着上一篇项目总结,这一篇是学习过程记录的最后一篇,这里会梳理:评论组件.商家组件.优化.打包.相关资料链接.项目github地址:https://github.com/66Web/ljq_eleme,欢迎Star. ratings seller 一.评论组件-ratings 评论组件主要分为三块 评分信息-overview 评论选择-ratingselect 评论详细信息 评分信息部分 左侧评分 布局Dom <div class="ratings-content">…
Golang Gin 项目包依赖管理 godep 使用 标签(空格分隔): Go 在按照github.com/tools/godep文档go get完包以后,调整项目结构为$GOPATH/src/$PROJECT_NAME/,同时使项目编译没有问题.执行godep save命令,出现了一系列包缺失的问题: github.com/campoy/embedmd github.com/client9/misspell/cmd/misspell github.com/dustin/go-broadcas…