fix go vet failures

cache/refs.go:110::error: unreachable code (vet)
util/progress/progress.go:119::error: unreachable code (vet)
util/progress/progress_test.go:130::error: unreachable code (vet)

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
docker-18.09
Akihiro Suda 2017-06-13 08:32:30 +00:00
parent 4709a486db
commit 38d807bd23
3 changed files with 10 additions and 15 deletions

5
cache/refs.go vendored
View File

@ -94,7 +94,7 @@ func (cr *cacheRecord) Mount() ([]mount.Mount, error) {
return nil, errors.Wrapf(err, "failed to mount %s", cr.id)
}
return m, nil
} else {
}
if cr.viewMount == nil { // TODO: handle this better
cr.view = generateID()
m, err := cr.cm.Snapshotter.View(context.TODO(), cr.view, cr.id)
@ -107,9 +107,6 @@ func (cr *cacheRecord) Mount() ([]mount.Mount, error) {
return cr.viewMount, nil
}
return nil, errors.New("snapshot mount not implemented")
}
func (cr *cacheRecord) ID() string {
return cr.id
}

View File

@ -116,7 +116,6 @@ func (pr *progressReader) Read(ctx context.Context) (*Progress, error) {
pr.cond.Wait()
}
}
return nil, errors.Errorf("Read not implemented")
}
func (pr *progressReader) append(pw *progressWriter) {

View File

@ -127,5 +127,4 @@ func saveProgress(ctx context.Context, pr ProgressReader, t *trace) error {
}
t.items = append(t.items, *p)
}
return nil
}