[chore] Update gin to v1.9.0 (#1553)

This commit is contained in:
Daenney
2023-02-25 13:12:40 +01:00
committed by GitHub
parent 689a10fe17
commit ecdc8379fa
347 changed files with 166814 additions and 3671 deletions

View File

@ -7,6 +7,7 @@ import (
"math"
"reflect"
"time"
"unicode/utf8"
)
// major
@ -629,7 +630,11 @@ func (d *cborDecDriver) DecodeBytes(bs []byte) (bsOut []byte) {
}
func (d *cborDecDriver) DecodeStringAsBytes() (s []byte) {
return d.DecodeBytes(nil)
s = d.DecodeBytes(nil)
if d.h.ValidateUnicode && !utf8.Valid(s) {
d.d.errorf("DecodeStringAsBytes: invalid UTF-8: %s", s)
}
return
}
func (d *cborDecDriver) DecodeTime() (t time.Time) {