Skip to content

Commit

Permalink
improved
Browse files Browse the repository at this point in the history
  • Loading branch information
admpub committed May 1, 2021
1 parent 32ddf38 commit 4d7b08d
Show file tree
Hide file tree
Showing 9 changed files with 175 additions and 141 deletions.
4 changes: 2 additions & 2 deletions application/library/common/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import (

// IsCaptchaErrCode 是否验证码错误码
func IsCaptchaErrCode(code stdCode.Code) bool {
return code == stdCode.CaptchaError
return code.Is(stdCode.CaptchaError)
}

func IsFailureCode(code stdCode.Code) bool {
return code != stdCode.Success
return code.Fail()
}

// IsCaptchaError 用户验证码错误
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ require (
github.com/webx-top/codec v0.0.1
github.com/webx-top/com v0.2.0
github.com/webx-top/db v1.1.6
github.com/webx-top/echo v2.10.5+incompatible
github.com/webx-top/echo v2.10.6+incompatible
github.com/webx-top/image v0.0.7
github.com/webx-top/pagination v0.1.0
github.com/xtaci/lossyconn v0.0.0-20200209145036-adba10fffc37 // indirect
Expand Down
8 changes: 2 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ github.com/admpub/confl v0.0.3 h1:2e3zd/dbM5SrAkbhH2WQXZYBTcFfa6/qmmZ40aUHqnk=
github.com/admpub/confl v0.0.3/go.mod h1:9yFw0gZSYkHz6O6uIyZd3HmEw14TvEVyeQRUnpinAcQ=
github.com/admpub/copier v0.0.1 h1:31CUMHDQWLZVjrhYNLHdMdFeqefnCZCxEVBe1I0kEHI=
github.com/admpub/copier v0.0.1/go.mod h1:btinsI8Gf3LM4jLPyFvO8G/hZ9zerUuEHKoP2+aMMhE=
github.com/admpub/cr v0.0.0-20200630080251-9947244796af h1:JKvz8zCApy9s/o7CPWz8124g9Z5acK6HG01qzWF/xeg=
github.com/admpub/cr v0.0.0-20200630080251-9947244796af/go.mod h1:CjifDz4kegFem3GDNKNDPHfVU/xMXCz6CWd/6e7RR1Q=
github.com/admpub/cr v0.0.1 h1:BOcPKsQIt/rFf1cy7kYLQU63hVLm1DOCbSOA8JnXfM0=
github.com/admpub/cr v0.0.1/go.mod h1:L8SQBq471WHLJtpCS0BsYimgW4oYiGMGuJ6o4ERGNeo=
github.com/admpub/cron v0.0.1 h1:MiptkQ1CeGko2hzwcMmr7DsGJ+Rc9Py13w4pBPf2TdI=
Expand Down Expand Up @@ -1370,10 +1368,8 @@ github.com/webx-top/db v1.1.6/go.mod h1:a3c7UZmv1kaNVkiCjsb1gypf41vc9g+JcsZIxK7O
github.com/webx-top/echo v2.1.5+incompatible/go.mod h1:ufVP//GwP1suggBSQW7l8G9XcKxZM+FIfCMElLAQqF8=
github.com/webx-top/echo v2.8.3+incompatible/go.mod h1:ufVP//GwP1suggBSQW7l8G9XcKxZM+FIfCMElLAQqF8=
github.com/webx-top/echo v2.9.3+incompatible/go.mod h1:ufVP//GwP1suggBSQW7l8G9XcKxZM+FIfCMElLAQqF8=
github.com/webx-top/echo v2.10.4+incompatible h1:N6RNCadGwq0564PCANRRRyHlyqlVluIrRtuo5LipJ6E=
github.com/webx-top/echo v2.10.4+incompatible/go.mod h1:ufVP//GwP1suggBSQW7l8G9XcKxZM+FIfCMElLAQqF8=
github.com/webx-top/echo v2.10.5+incompatible h1:hYWAB8ryMP/4Sdr1R1mi7U9awk948n3Zoao95wYR6+I=
github.com/webx-top/echo v2.10.5+incompatible/go.mod h1:ufVP//GwP1suggBSQW7l8G9XcKxZM+FIfCMElLAQqF8=
github.com/webx-top/echo v2.10.6+incompatible h1:Nr5lf+MhFTCLZAeWAMLBe1zxsHKp2L8lRmpR3eMJeB4=
github.com/webx-top/echo v2.10.6+incompatible/go.mod h1:ufVP//GwP1suggBSQW7l8G9XcKxZM+FIfCMElLAQqF8=
github.com/webx-top/echo-prometheus v1.0.2 h1:IPivTWPSo3XFkx/adlzjscFtDbULt/DRq8zpm9HdWXQ=
github.com/webx-top/echo-prometheus v1.0.2/go.mod h1:Y3xeyGLtpAjZmV/Ui8fqRf9gymwdSQagJ21RekXUZaw=
github.com/webx-top/image v0.0.7 h1:G56i+UXVZ8DzP2ZkH1bm4/d9Tcik1Q6BUDPKpQ55gKI=
Expand Down
152 changes: 21 additions & 131 deletions vendor/github.com/webx-top/echo/code/code.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 56 additions & 0 deletions vendor/github.com/webx-top/echo/code/code_dict.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions vendor/github.com/webx-top/echo/code/code_map.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 52 additions & 0 deletions vendor/github.com/webx-top/echo/code/consts.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions vendor/github.com/webx-top/echo/code/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,7 @@ github.com/webx-top/db/lib/sqlbuilder
github.com/webx-top/db/mongo
github.com/webx-top/db/mysql
github.com/webx-top/db/sqlite
# github.com/webx-top/echo v2.10.5+incompatible
# github.com/webx-top/echo v2.10.6+incompatible
## explicit
github.com/webx-top/echo
github.com/webx-top/echo/code
Expand Down

0 comments on commit 4d7b08d

Please sign in to comment.