From 034440d4da86a4313a89d2c6c269a260aebe7861 Mon Sep 17 00:00:00 2001 From: caixw Date: Thu, 5 Dec 2024 12:00:04 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 10 +++++----- go.sum | 16 ++++++++++------ router.go | 2 +- web.go | 4 ++-- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/go.mod b/go.mod index b3448e17..e7a7dff1 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/issue9/config v0.8.0 github.com/issue9/conv v1.3.5 github.com/issue9/errwrap v0.3.2 - github.com/issue9/localeutil v0.29.0 + github.com/issue9/localeutil v0.29.1 github.com/issue9/logs/v7 v7.6.4 github.com/issue9/mux/v9 v9.1.0 github.com/issue9/query/v3 v3.1.3 @@ -22,8 +22,8 @@ require ( github.com/jellydator/ttlcache/v3 v3.3.0 github.com/klauspost/compress v1.17.11 github.com/wk8/go-ordered-map/v2 v2.1.8 - golang.org/x/crypto v0.29.0 - golang.org/x/text v0.20.0 + golang.org/x/crypto v0.30.0 + golang.org/x/text v0.21.0 golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da gopkg.in/yaml.v3 v3.0.1 ) @@ -42,7 +42,7 @@ require ( github.com/x448/float16 v0.8.4 // indirect golang.org/x/mod v0.22.0 // indirect golang.org/x/net v0.21.0 // indirect - golang.org/x/sync v0.9.0 // indirect - golang.org/x/sys v0.27.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/sys v0.28.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect ) diff --git a/go.sum b/go.sum index e4faf125..7a01b11e 100644 --- a/go.sum +++ b/go.sum @@ -29,8 +29,8 @@ github.com/issue9/conv v1.3.5 h1:UWeA+Zqp5vjNDLrmhLhaXPjS1hL8gh4quX6Shk5njKQ= github.com/issue9/conv v1.3.5/go.mod h1:lkZYMyrmxy+HK//N4eLmwUl9mCwj0zgeTjnxgl/w7hM= github.com/issue9/errwrap v0.3.2 h1:7KEme9Pfe75M+sIMcPCn/DV90wjnOcRbO4DXVAHj3Fw= github.com/issue9/errwrap v0.3.2/go.mod h1:KcCLuUGiffjooLCUjL89r1cyO8/HT/VRcQrneO53N3A= -github.com/issue9/localeutil v0.29.0 h1:ShUm9P8jMOyjYsC10lZZUJllrjPWtpLidiqOhMi8FYk= -github.com/issue9/localeutil v0.29.0/go.mod h1:RlI+4d/NEyJboOX5QqeVaKWNY45Pbtsb55uvUfnUmaM= +github.com/issue9/localeutil v0.29.1 h1:C5vxqwcAFa9gzMWDni8KsZ2GYtKD+I20RMlKl78tK/U= +github.com/issue9/localeutil v0.29.1/go.mod h1:daxDbw51s4GWKjz6pxhh8baHzWDJEUUcsVrqaKs/A8o= github.com/issue9/logs/v7 v7.6.4 h1:NFM4oM2ggLPPZNgDb8PAOSqELtJOx7PTwoFd3o814wk= github.com/issue9/logs/v7 v7.6.4/go.mod h1:6fIj8OABk/qWm1c3E9f9oXe0FWwRyoZNWh449D391Zk= github.com/issue9/mux/v9 v9.1.0 h1:KFvCugh4eQf/2QiLVJOa2AzOEdGpG5xe7+JiqZCYluE= @@ -83,16 +83,20 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= +golang.org/x/crypto v0.30.0 h1:RwoQn3GkWiMkzlX562cLB7OxWvjH1L8xutO2WoJcRoY= +golang.org/x/crypto v0.30.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= -golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= -golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= -golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhSt0ABwskkZKjD3bXGnZGpNY= golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/router.go b/router.go index b3b3f35e..eb227bb9 100644 --- a/router.go +++ b/router.go @@ -34,7 +34,7 @@ type ( // 后者会在整个请求退出时才将 [Responser] 进行编码输出。 // // 返回值可以为空,表示在中间件执行过程中已经向客户端输出同内容。 - HandlerFunc = func(*Context) Responser + HandlerFunc func(*Context) Responser // Routers 提供管理路由的接口 Routers struct { diff --git a/web.go b/web.go index 209e8c06..1e2ed090 100644 --- a/web.go +++ b/web.go @@ -53,12 +53,12 @@ type ( // // NOTE: 不采用流的方式处理数据的原因是因为:编码过程中可能会出错, // 此时需要修改状态码,流式的因为有内容输出,状态码也已经固定,无法修改。 - MarshalFunc = func(*Context, any) ([]byte, error) + MarshalFunc func(*Context, any) ([]byte, error) // UnmarshalFunc 反序列化函数原型 // // NOTE: 参数 [io.Reader] 必定不会为空。 - UnmarshalFunc = func(io.Reader, any) error + UnmarshalFunc func(io.Reader, any) error ) // NewCache 声明带有统一前缀的缓存接口