зеркало из https://github.com/microsoft/docker.git
Merge pull request #30540 from asottile/unnecessary_if
Remove unnecessary if in builder/dockerfiles/parser Dump
This commit is contained in:
Коммит
14b9562c48
|
@ -21,13 +21,11 @@ func (node *Node) Dump() string {
|
|||
str += "(" + n.Dump() + ")\n"
|
||||
}
|
||||
|
||||
if node.Next != nil {
|
||||
for n := node.Next; n != nil; n = n.Next {
|
||||
if len(n.Children) > 0 {
|
||||
str += " " + n.Dump()
|
||||
} else {
|
||||
str += " " + strconv.Quote(n.Value)
|
||||
}
|
||||
for n := node.Next; n != nil; n = n.Next {
|
||||
if len(n.Children) > 0 {
|
||||
str += " " + n.Dump()
|
||||
} else {
|
||||
str += " " + strconv.Quote(n.Value)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче