mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-06 21:51:33 +00:00
Cleanup redundant else statements find via golint #11602
Signed-off-by: George MacRorie <gmacr31@gmail.com>
This commit is contained in:
@@ -239,17 +239,18 @@ func parseJSON(rest string) (*Node, map[string]bool, error) {
|
||||
|
||||
var top, prev *Node
|
||||
for _, str := range myJson {
|
||||
if s, ok := str.(string); !ok {
|
||||
s, ok := str.(string)
|
||||
if !ok {
|
||||
return nil, nil, errDockerfileNotStringArray
|
||||
} else {
|
||||
node := &Node{Value: s}
|
||||
if prev == nil {
|
||||
top = node
|
||||
} else {
|
||||
prev.Next = node
|
||||
}
|
||||
prev = node
|
||||
}
|
||||
|
||||
node := &Node{Value: s}
|
||||
if prev == nil {
|
||||
top = node
|
||||
} else {
|
||||
prev.Next = node
|
||||
}
|
||||
prev = node
|
||||
}
|
||||
|
||||
return top, map[string]bool{"json": true}, nil
|
||||
|
||||
Reference in New Issue
Block a user