Skip to content

Commit

Permalink
upgrade dependencies for go v1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperjiang committed Mar 24, 2021
1 parent 84299d6 commit db81e33
Show file tree
Hide file tree
Showing 12 changed files with 172 additions and 520 deletions.
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
language: go
go:
- 1.11.x
- 1.12.x
- 1.13.x
- 1.14.x
- 1.15.x
- 1.16.x

notifications:
email: false

install:
- export GO111MODULE=on
- export config=../config.yml
- go mod download

Expand Down
218 changes: 0 additions & 218 deletions Gopkg.lock

This file was deleted.

58 changes: 0 additions & 58 deletions Gopkg.toml

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

Gin Skeleton is a simple boilerplate to kickstart a web server project based on Gin Framework.

Require go version >= 1.11, if your go version is 1.10, please use branch `go1.10`.
Require go version >= 1.14, if your go version is lower, please use legacy branches,
there are quite a lot of incompatible changes between master and legacy branches.

```
# start a web server listening on 0.0.0.0:8080
Expand All @@ -16,9 +17,9 @@ go run main.go
## Components

- Framework: [gin-gonic/gin](https://github.com/gin-gonic/gin)
- Database ORM: [jinzhu/gorm](https://github.com/jinzhu/gorm)
- Database ORM: [go-gorm/gorm](https://github.com/go-gorm/gorm)
- Database migration: [rubenv/sql-migrate](https://github.com/rubenv/sql-migrate)
- Leveled logs: [golang/glog](https://github.com/golang/glog)
- Zero Allocation JSON Logger: [rs/zerolog](https://github.com/rs/zerolog)
- YAML support: [go-yaml/yaml](https://github.com/go-yaml/yaml)
- Testing toolkit: [stretchr/testify](https://github.com/stretchr/testify)

Expand All @@ -34,7 +35,6 @@ Edit the `config.yml` with your own config
CREATE DATABASE IF NOT EXISTS `gin` DEFAULT CHARACTER SET utf8mb4;
```


**Migrates the database to the most recent version available**

```
Expand Down
1 change: 0 additions & 1 deletion config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ server:
mode: debug
static_dir: ./public
view_dir: ./view
log_dir: ./log
upload_dir: ./storage
max_multipart_memory: 10

Expand Down
6 changes: 0 additions & 6 deletions config/config.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package config

import (
"flag"
"io/ioutil"
"log"
"os"
Expand All @@ -25,14 +24,12 @@ type ServerConfig struct {
Version string
StaticDir string `yaml:"static_dir"`
ViewDir string `yaml:"view_dir"`
LogDir string `yaml:"log_dir"`
UploadDir string `yaml:"upload_dir"`
MaxMultipartMemory int64 `yaml:"max_multipart_memory"`
}

// DatabaseConfig is the database config
type DatabaseConfig struct {
Dialect string
DSN string `yaml:"datasource"`
MaxIdleConns int `yaml:"max_idle_conns"`
MaxOpenConns int `yaml:"max_open_conns"`
Expand Down Expand Up @@ -62,9 +59,6 @@ func Load(file string) (GlobalConfig, error) {
Server = Global.Server
Database = Global.Database

// set log dir flag for glog
flag.CommandLine.Set("log_dir", Server.LogDir)

return Global, nil
}

Expand Down
23 changes: 12 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
module github.com/hyperjiang/gin-skeleton

go 1.11
go 1.16

require (
github.com/appleboy/gin-jwt v2.5.0+incompatible
github.com/appleboy/gin-jwt/v2 v2.6.2
github.com/gin-gonic/gin v1.4.0
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/hyperjiang/php v0.2.0
github.com/jinzhu/gorm v1.9.10
github.com/stretchr/testify v1.4.0
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c
gopkg.in/dgrijalva/jwt-go.v3 v3.2.0 // indirect
gopkg.in/yaml.v2 v2.2.2
github.com/appleboy/gin-jwt/v2 v2.6.4
github.com/gin-gonic/gin v1.6.3
github.com/hyperjiang/php v0.6.1
github.com/onsi/ginkgo v1.15.2 // indirect
github.com/onsi/gomega v1.11.0 // indirect
github.com/rs/zerolog v1.20.0
github.com/stretchr/testify v1.7.0
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
gopkg.in/yaml.v2 v2.4.0
gorm.io/driver/mysql v1.0.5
gorm.io/gorm v1.21.4
)
Loading

0 comments on commit db81e33

Please sign in to comment.