Skip to content

Commit 2cd55d9

Browse files
author
imtbkcat
committed
address comment
1 parent 3e28a49 commit 2cd55d9

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
@@ -753,16 +753,14 @@ func (n *SetRoleStmt) Restore(ctx *RestoreCtx) error {
753753
case SetRoleAllExcept:
754754
ctx.WriteKeyWord(" ALL EXCEPT")
755755
}
756-
if len(n.RoleList) > 0 {
757-
for i, role := range n.RoleList {
758-
ctx.WritePlain(" ")
759-
err := role.Restore(ctx)
760-
if err != nil {
761-
return errors.Annotate(err, "An error occurred while restore SetRoleStmt.RoleList")
762-
}
763-
if i != len(n.RoleList)-1 {
764-
ctx.WritePlain(",")
765-
}
756+
for i, role := range n.RoleList {
757+
ctx.WritePlain(" ")
758+
err := role.Restore(ctx)
759+
if err != nil {
760+
return errors.Annotate(err, "An error occurred while restore SetRoleStmt.RoleList")
761+
}
762+
if i != len(n.RoleList)-1 {
763+
ctx.WritePlain(",")
766764
}
767765
}
768766
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)