mirror of
https://github.com/gin-gonic/gin.git
synced 2025-12-11 19:47:00 +08:00
using errors instead of fmt
This commit is contained in:
parent
ee1f501d4a
commit
6b6ac46ae3
@ -7,7 +7,6 @@ package binding
|
|||||||
import (
|
import (
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
|
||||||
"mime/multipart"
|
"mime/multipart"
|
||||||
"reflect"
|
"reflect"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -739,7 +738,7 @@ func TestTrySetCustomIntegration(t *testing.T) {
|
|||||||
type badCustom struct{}
|
type badCustom struct{}
|
||||||
|
|
||||||
func (b *badCustom) UnmarshalParam(s string) error {
|
func (b *badCustom) UnmarshalParam(s string) error {
|
||||||
return fmt.Errorf("boom")
|
return errors.New("boom")
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestTrySetCustomError(t *testing.T) {
|
func TestTrySetCustomError(t *testing.T) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user