diff --git a/README.md b/README.md index ea796f9c..ca4486c0 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,9 @@ [![Go](https://github.com/issue9/cmfx/actions/workflows/go.yml/badge.svg)](https://github.com/issue9/cmfx/actions/workflows/go.yml) [![vitest](https://github.com/issue9/cmfx/actions/workflows/vitest.yml/badge.svg)](https://github.com/issue9/cmfx/actions/workflows/vitest.yml) [![PkgGoDev](https://pkg.go.dev/badge/github.com/issue9/cmfx)](https://pkg.go.dev/github.com/issue9/cmfx) -![NPM Version](https://img.shields.io/npm/v/%40cmfx%2Fadmin) - +[![NPM Version](https://img.shields.io/npm/v/%40cmfx%2Fadmin)](https://www.npmjs.com/package/@cmfx/admin) ![Go version](https://img.shields.io/github/go-mod/go-version/issue9/cmfx) [![codecov](https://codecov.io/gh/issue9/cmfx/graph/badge.svg?token=D5y3FOJk8A)](https://codecov.io/gh/issue9/cmfx) - ![License](https://img.shields.io/github/license/issue9/cmfx) ## 目录结构 diff --git a/cmfx/initial/test/suite.go b/cmfx/initial/test/suite.go index bec037bc..3f0ec3e8 100644 --- a/cmfx/initial/test/suite.go +++ b/cmfx/initial/test/suite.go @@ -26,6 +26,7 @@ import ( "github.com/issue9/webuse/v7/middlewares/acl/ratelimit" "github.com/issue9/webuse/v7/middlewares/auth/token" "github.com/issue9/webuse/v7/plugins/openapi/swagger" + "golang.org/x/text/language" "github.com/issue9/cmfx/cmfx" @@ -115,7 +116,8 @@ func (s *Suite) TableExists(name string) *Suite { // newServer 创建 [web.Server] 实例 func newServer(a *assert.Assertion) *cmfx.Module { srv, err := server.NewHTTP("test", "1.0.0", &server.Options{ - Logs: logs.New(logs.NewTermHandler(os.Stdout, nil), logs.WithLevels(logs.AllLevels()...), logs.WithCreated(logs.NanoLayout)), + Language: language.SimplifiedChinese, + Logs: logs.New(logs.NewTermHandler(os.Stdout, nil), logs.WithLevels(logs.AllLevels()...), logs.WithCreated(logs.NanoLayout)), Codec: web.NewCodec(). AddMimetype(json.Mimetype, json.Marshal, json.Unmarshal, json.ProblemMimetype). AddMimetype(yaml.Mimetype, yaml.Marshal, yaml.Unmarshal, yaml.ProblemMimetype).