1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 10:27:06 +00:00

update dependencies

This commit is contained in:
Gerasimos (Makis) Maropoulos
2025-08-15 23:29:20 +03:00
parent de4f462198
commit a8a3afea22
186 changed files with 694 additions and 689 deletions

View File

@@ -46,7 +46,7 @@ func Verify() iris.Handler {
verifier := jwt.NewVerifier(jwt.HS256, []byte(secret), jwt.Expected{Issuer: util.AppName})
verifier.Extractors = []jwt.TokenExtractor{jwt.FromHeader} // extract token only from Authorization: Bearer $token
return verifier.Verify(func() interface{} {
return verifier.Verify(func() any {
return new(UserClaims)
})
}

View File

@@ -60,7 +60,7 @@ func Do(method, url string, body io.Reader, opts ...RequestOption) (*http.Respon
}
// JSON fires a request with "v" as client json data.
func JSON(method, url string, v interface{}, opts ...RequestOption) (*http.Response, error) {
func JSON(method, url string, v any, opts ...RequestOption) (*http.Response, error) {
buf := new(bytes.Buffer)
err := json.NewEncoder(buf).Encode(v)
if err != nil {
@@ -85,7 +85,7 @@ func Form(method, url string, formData url.Values, opts ...RequestOption) (*http
}
// BindResponse binds a response body to the "dest" pointer and closes the body.
func BindResponse(resp *http.Response, dest interface{}) error {
func BindResponse(resp *http.Response, dest any) error {
contentType := resp.Header.Get("Content-Type")
if idx := strings.IndexRune(contentType, ';'); idx > 0 {
contentType = contentType[0:idx]

View File

@@ -1,6 +1,6 @@
module myapp
go 1.24.3
go 1.25
require (
github.com/google/uuid v1.6.0