Skip to content
Myr

chore: support min version of go: 1.14 (#2964)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by thinkerou · committed by GitHub · parent 2bde107 · Browse files · 4 files+5 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+5 added−5 removed

  • other:+5 added−5 removed

4 files+5 added−5 removed

modified:.github/workflows/gin.yml+1 added-1 removed
modified:debug_test.go+1 added-1 removed
102 unmodified lines
103 SetMode(TestMode)104 })105 m, e := getMinVer(runtime.Version())106 if e == nil && m <= ginSupportMinGoVer {107 assert.Equal(t, "[GIN-debug] [WARNING] Now Gin requires Go 1.13+.\n\n[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.\n\n", re)107 assert.Equal(t, "[GIN-debug] [WARNING] Now Gin requires Go 1.14+.\n\n[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.\n\n", re)108 } else {109 assert.Equal(t, "[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.\n\n", re)110 }111}
55 unmodified lines
modified:debug.go+2 added-2 removed
10 unmodified lines
11 "strconv"12 "strings"13)1415const ginSupportMinGoVer = 1315const ginSupportMinGoVer = 141617// IsDebugging returns true if the framework is running in debug mode.18// Use SetMode(gin.ReleaseMode) to disable debug mode.19func IsDebugging() bool {
46 unmodified lines
66}6768func debugPrintWARNINGDefault() {69 if v, e := getMinVer(runtime.Version()); e == nil && v <= ginSupportMinGoVer {70 debugPrint(`[WARNING] Now Gin requires Go 1.13+.70 debugPrint(`[WARNING] Now Gin requires Go 1.14+.7172`)73 }74 debugPrint(`[WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
27 unmodified lines
modified:README.md+1 added-1 removed
84 unmodified lines
85## Installation8687To install Gin package, you need to install Go and set your Go workspace first.88891. The first need [Go](https://golang.org/) installed (**version 1.13+ is required**), then you can use the below Go command to install Gin.891. The first need [Go](https://golang.org/) installed (**version 1.14+ is required**), then you can use the below Go command to install Gin.9091```sh92$ go get -u github.com/gin-gonic/gin93```
2234 unmodified lines