Merge tag 'tags/v1.11.0'

This commit is contained in:
2025-10-14 13:53:17 +03:00
72 changed files with 2578 additions and 930 deletions
+4 -4
View File
@@ -9,7 +9,7 @@ import (
"reflect"
"strings"
"git.company.lan/gopkg/gin/internal/json"
"git.company.lan/gopkg/gin/codec/json"
)
// ErrorType is an unsigned 64-bit error code as defined in the gin spec.
@@ -77,7 +77,7 @@ func (msg *Error) JSON() any {
// MarshalJSON implements the json.Marshaller interface.
func (msg *Error) MarshalJSON() ([]byte, error) {
return json.Marshal(msg.JSON())
return json.API.Marshal(msg.JSON())
}
// Error implements the error interface.
@@ -91,7 +91,7 @@ func (msg *Error) IsType(flags ErrorType) bool {
}
// Unwrap returns the wrapped error, to allow interoperability with errors.Is(), errors.As() and errors.Unwrap()
func (msg *Error) Unwrap() error {
func (msg Error) Unwrap() error {
return msg.Err
}
@@ -157,7 +157,7 @@ func (a errorMsgs) JSON() any {
// MarshalJSON implements the json.Marshaller interface.
func (a errorMsgs) MarshalJSON() ([]byte, error) {
return json.Marshal(a.JSON())
return json.API.Marshal(a.JSON())
}
func (a errorMsgs) String() string {