chore(ci): update dependencies (#2827)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>
This commit is contained in:
Matthieu MOREL
2021-08-19 09:46:31 +02:00
committed by GitHub
parent b463b1c2a1
commit 435a76b735
18 changed files with 412 additions and 144 deletions

View File

@ -20,8 +20,8 @@ import (
"time"
"github.com/gin-gonic/gin/testdata/protoexample"
"github.com/golang/protobuf/proto"
"github.com/stretchr/testify/assert"
"google.golang.org/protobuf/proto"
)
type appkey struct {
@ -832,7 +832,6 @@ func testFormBindingEmbeddedStruct(t *testing.T, method, path, badPath, body, ba
assert.Equal(t, 1, obj.Page)
assert.Equal(t, 2, obj.Size)
assert.Equal(t, "test-appkey", obj.Appkey)
}
func testFormBinding(t *testing.T, method, path, badPath, body, badBody string) {

View File

@ -26,7 +26,7 @@ var (
ErrConvertToMapString = errors.New("can not convert to map of strings")
)
func mapUri(ptr interface{}, m map[string][]string) error {
func mapURI(ptr interface{}, m map[string][]string) error {
return mapFormByTag(ptr, m, "uri")
}
@ -83,7 +83,7 @@ func mapping(value reflect.Value, field reflect.StructField, setter setter, tag
return false, nil
}
var vKind = value.Kind()
vKind := value.Kind()
if vKind == reflect.Ptr {
var isNew bool
@ -310,7 +310,6 @@ func setTimeField(val string, structField reflect.StructField, value reflect.Val
t := time.Unix(tv/int64(d), tv%int64(d))
value.Set(reflect.ValueOf(t))
return nil
}
if val == "" {

View File

@ -131,7 +131,7 @@ func TestMappingURI(t *testing.T) {
var s struct {
F int `uri:"field"`
}
err := mapUri(&s, map[string][]string{"field": {"6"}})
err := mapURI(&s, map[string][]string{"field": {"6"}})
assert.NoError(t, err)
assert.Equal(t, int(6), s.F)
}

View File

@ -8,7 +8,7 @@ import (
"io/ioutil"
"net/http"
"github.com/golang/protobuf/proto"
"google.golang.org/protobuf/proto"
)
type protobufBinding struct{}

View File

@ -11,7 +11,7 @@ func (uriBinding) Name() string {
}
func (uriBinding) BindUri(m map[string][]string, obj interface{}) error {
if err := mapUri(obj, m); err != nil {
if err := mapURI(obj, m); err != nil {
return err
}
return validate(obj)