From 56839f5ded0a2878a1e1ab1f332094380146a051 Mon Sep 17 00:00:00 2001 From: suyiiyii Date: Mon, 20 Jan 2025 23:46:29 +0800 Subject: [PATCH] =?UTF-8?q?build(conf):=20=E6=9B=B4=E6=96=B0=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E5=A4=84=E7=90=86=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 app/facade/conf 和 app/user/conf 模块中添加 validator 和 yaml 库的导入 - 调整导入库的顺序,提高代码可读性 --- app/facade/conf/conf.go | 7 ++++--- app/user/conf/conf.go | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/facade/conf/conf.go b/app/facade/conf/conf.go index d915e45..d4ee903 100644 --- a/app/facade/conf/conf.go +++ b/app/facade/conf/conf.go @@ -2,11 +2,12 @@ package conf import ( _ "embed" - "os" - "sync" - "github.com/cloudwego/hertz/pkg/common/hlog" "github.com/kr/pretty" + "gopkg.in/validator.v2" + "gopkg.in/yaml.v2" + "os" + "sync" ) var ( diff --git a/app/user/conf/conf.go b/app/user/conf/conf.go index fbac3a3..049e791 100644 --- a/app/user/conf/conf.go +++ b/app/user/conf/conf.go @@ -10,6 +10,8 @@ import ( "github.com/kr/pretty" _ "github.com/spf13/viper" _ "github.com/spf13/viper/remote" + "gopkg.in/validator.v2" + "gopkg.in/yaml.v2" ) var (