1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #16103 from HuKeping/format

Refactor some code to use simply format
This commit is contained in:
Doug Davis 2015-09-08 13:08:35 -04:00
commit 3fdfbd43b6

View file

@ -27,8 +27,7 @@ func (graph *Graph) WalkHistory(img *image.Image, handler func(image.Image) erro
return nil
}
// depth returns the number of parents for a
// current image
// depth returns the number of parents for the current image
func (graph *Graph) depth(img *image.Image) (int, error) {
var (
count = 0
@ -38,8 +37,7 @@ func (graph *Graph) depth(img *image.Image) (int, error) {
for parent != nil {
count++
parent, err = graph.GetParent(parent)
if err != nil {
if parent, err = graph.GetParent(parent); err != nil {
return -1, err
}
}