mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-18 06:42:10 +08:00
Merge branch 'gin-gonic-master' into github-actions
This commit is contained in:
commit
ac5241fa2b
@ -2,6 +2,7 @@
|
|||||||
// Use of this source code is governed by a MIT style
|
// Use of this source code is governed by a MIT style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build !nomsgpack
|
||||||
// +build !nomsgpack
|
// +build !nomsgpack
|
||||||
|
|
||||||
package binding
|
package binding
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Use of this source code is governed by a MIT style
|
// Use of this source code is governed by a MIT style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build !nomsgpack
|
||||||
// +build !nomsgpack
|
// +build !nomsgpack
|
||||||
|
|
||||||
package binding
|
package binding
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Use of this source code is governed by a MIT style
|
// Use of this source code is governed by a MIT style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build nomsgpack
|
||||||
// +build nomsgpack
|
// +build nomsgpack
|
||||||
|
|
||||||
package binding
|
package binding
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Use of this source code is governed by a MIT style
|
// Use of this source code is governed by a MIT style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build !nomsgpack
|
||||||
// +build !nomsgpack
|
// +build !nomsgpack
|
||||||
|
|
||||||
package binding
|
package binding
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Use of this source code is governed by a MIT style
|
// Use of this source code is governed by a MIT style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build !nomsgpack
|
||||||
// +build !nomsgpack
|
// +build !nomsgpack
|
||||||
|
|
||||||
package binding
|
package binding
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
// +build appengine
|
|
||||||
|
|
||||||
// Copyright 2017 Manu Martinez-Almeida. All rights reserved.
|
// Copyright 2017 Manu Martinez-Almeida. All rights reserved.
|
||||||
// Use of this source code is governed by a MIT style
|
// Use of this source code is governed by a MIT style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build appengine
|
||||||
|
// +build appengine
|
||||||
|
|
||||||
package gin
|
package gin
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
//go:build go1.13
|
||||||
// +build go1.13
|
// +build go1.13
|
||||||
|
|
||||||
package gin
|
package gin
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// StringToBytes converts string to byte slice without a memory allocation.
|
// StringToBytes converts string to byte slice without a memory allocation.
|
||||||
func StringToBytes(s string) (b []byte) {
|
func StringToBytes(s string) []byte {
|
||||||
return *(*[]byte)(unsafe.Pointer(
|
return *(*[]byte)(unsafe.Pointer(
|
||||||
&struct {
|
&struct {
|
||||||
string
|
string
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Use of this source code is governed by a MIT style
|
// Use of this source code is governed by a MIT style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build !jsoniter
|
||||||
// +build !jsoniter
|
// +build !jsoniter
|
||||||
|
|
||||||
package json
|
package json
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Use of this source code is governed by a MIT style
|
// Use of this source code is governed by a MIT style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build jsoniter
|
||||||
// +build jsoniter
|
// +build jsoniter
|
||||||
|
|
||||||
package json
|
package json
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Use of this source code is governed by a MIT style
|
// Use of this source code is governed by a MIT style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build !nomsgpack
|
||||||
// +build !nomsgpack
|
// +build !nomsgpack
|
||||||
|
|
||||||
package render
|
package render
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Use of this source code is governed by a MIT style
|
// Use of this source code is governed by a MIT style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build !nomsgpack
|
||||||
// +build !nomsgpack
|
// +build !nomsgpack
|
||||||
|
|
||||||
package render
|
package render
|
||||||
|
@ -238,7 +238,6 @@ func TestRouteParamsByName(t *testing.T) {
|
|||||||
|
|
||||||
assert.True(t, ok)
|
assert.True(t, ok)
|
||||||
assert.Equal(t, name, c.Param("name"))
|
assert.Equal(t, name, c.Param("name"))
|
||||||
assert.Equal(t, name, c.Param("name"))
|
|
||||||
assert.Equal(t, lastName, c.Param("last_name"))
|
assert.Equal(t, lastName, c.Param("last_name"))
|
||||||
|
|
||||||
assert.Empty(t, c.Param("wtf"))
|
assert.Empty(t, c.Param("wtf"))
|
||||||
@ -272,7 +271,6 @@ func TestRouteParamsByNameWithExtraSlash(t *testing.T) {
|
|||||||
|
|
||||||
assert.True(t, ok)
|
assert.True(t, ok)
|
||||||
assert.Equal(t, name, c.Param("name"))
|
assert.Equal(t, name, c.Param("name"))
|
||||||
assert.Equal(t, name, c.Param("name"))
|
|
||||||
assert.Equal(t, lastName, c.Param("last_name"))
|
assert.Equal(t, lastName, c.Param("last_name"))
|
||||||
|
|
||||||
assert.Empty(t, c.Param("wtf"))
|
assert.Empty(t, c.Param("wtf"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user