Skip to content

Commit

Permalink
feat(依赖): 升级依赖版本
Browse files Browse the repository at this point in the history
  • Loading branch information
storezhang committed Dec 13, 2023
1 parent 94566be commit 9dc9b65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/go-resty/resty/v2 v2.10.0
github.com/goexl/env v0.0.2
github.com/goexl/exception v0.0.1
github.com/goexl/gex v0.3.1
github.com/goexl/gex v0.3.2
github.com/goexl/gox v0.3.8
github.com/goexl/log v0.0.5
github.com/goexl/mengpo v0.2.5
Expand All @@ -21,7 +21,6 @@ require (
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.16.0 // indirect
github.com/goexl/baozheng v0.0.1 // indirect
github.com/goexl/exc v0.0.5 // indirect
github.com/goexl/guc v0.0.7 // indirect
github.com/google/uuid v1.4.0 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
Expand Down
6 changes: 3 additions & 3 deletions internal/core/getter.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,10 @@ func (g *Getter) file(args ...any) (result any, err error) {
func (g *Getter) url(args ...any) (result any, err error) {
url := ""
if 0 == len(args) {
err = exc.NewField("必须传入参数", field.New("args", args))
err = exception.New().Message("必须传入参数").Field(field.New("args", args)).Build()
} else {
url = gox.ToString(args[0])
err = gox.If(g.isHttp(url), exc.NewField("必须是URL地址", field.New("url", url)))
err = gox.If(g.isHttp(url), exception.New().Message("必须是URL地址").Field(field.New("url", url)).Build())
}
if nil != err {
return
Expand All @@ -270,7 +270,7 @@ func (g *Getter) url(args ...any) (result any, err error) {

func (g *Getter) match(args ...any) (result any, err error) {
if 2 != len(args) {
err = exc.NewFields("参数错误", field.New("args", args), field.New("need", 2), field.New("real", 1))
err = exception.New().Message("参数错误").Field(field.New("args", args)).Build()
}
if nil != err {
return
Expand Down

0 comments on commit 9dc9b65

Please sign in to comment.