Skip to content

Commit 5a8673d

Browse files
author
imtbkcat
committed
address comment
1 parent 3d40bf9 commit 5a8673d

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

ast/misc.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -790,16 +790,14 @@ func (n *SetRoleStmt) Restore(ctx *RestoreCtx) error {
790790
case SetRoleAllExcept:
791791
ctx.WriteKeyWord(" ALL EXCEPT")
792792
}
793-
if len(n.RoleList) > 0 {
794-
for i, role := range n.RoleList {
795-
ctx.WritePlain(" ")
796-
err := role.Restore(ctx)
797-
if err != nil {
798-
return errors.Annotate(err, "An error occurred while restore SetRoleStmt.RoleList")
799-
}
800-
if i != len(n.RoleList)-1 {
801-
ctx.WritePlain(",")
802-
}
793+
for i, role := range n.RoleList {
794+
ctx.WritePlain(" ")
795+
err := role.Restore(ctx)
796+
if err != nil {
797+
return errors.Annotate(err, "An error occurred while restore SetRoleStmt.RoleList")
798+
}
799+
if i != len(n.RoleList)-1 {
800+
ctx.WritePlain(",")
803801
}
804802
}
805803
return nil

go.mod1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ require (
1111
github.com/pingcap/errors v0.11.0
1212
github.com/pingcap/tidb v0.0.0-20190218065808-69472bd1a6e9
1313
github.com/pingcap/tipb v0.0.0-20190107072121-abbec73437b7
14-
github.com/shirou/gopsutil v2.18.12+incompatible // indirect
1514
github.com/sirupsen/logrus v1.3.0
1615
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2
1716
)

0 commit comments

Comments
 (0)