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
parent
4709a486db
commit
38d807bd23
|
@ -94,7 +94,7 @@ func (cr *cacheRecord) Mount() ([]mount.Mount, error) {
|
||||||
return nil, errors.Wrapf(err, "failed to mount %s", cr.id)
|
return nil, errors.Wrapf(err, "failed to mount %s", cr.id)
|
||||||
}
|
}
|
||||||
return m, nil
|
return m, nil
|
||||||
} else {
|
}
|
||||||
if cr.viewMount == nil { // TODO: handle this better
|
if cr.viewMount == nil { // TODO: handle this better
|
||||||
cr.view = generateID()
|
cr.view = generateID()
|
||||||
m, err := cr.cm.Snapshotter.View(context.TODO(), cr.view, cr.id)
|
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 cr.viewMount, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil, errors.New("snapshot mount not implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (cr *cacheRecord) ID() string {
|
func (cr *cacheRecord) ID() string {
|
||||||
return cr.id
|
return cr.id
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,6 @@ func (pr *progressReader) Read(ctx context.Context) (*Progress, error) {
|
||||||
pr.cond.Wait()
|
pr.cond.Wait()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil, errors.Errorf("Read not implemented")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pr *progressReader) append(pw *progressWriter) {
|
func (pr *progressReader) append(pw *progressWriter) {
|
||||||
|
|
|
@ -127,5 +127,4 @@ func saveProgress(ctx context.Context, pr ProgressReader, t *trace) error {
|
||||||
}
|
}
|
||||||
t.items = append(t.items, *p)
|
t.items = append(t.items, *p)
|
||||||
}
|
}
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue