зеркало из https://github.com/microsoft/docker.git
using `errors.New` instead `fmt.Error`.
This commit is contained in:
Родитель
a6c9a332d0
Коммит
e8437e8fcf
|
@ -2,6 +2,7 @@ package devmapper
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/dotcloud/docker/utils"
|
"github.com/dotcloud/docker/utils"
|
||||||
"io"
|
"io"
|
||||||
|
@ -439,11 +440,11 @@ func (devices *DeviceSet) initDevmapper(doInit bool) error {
|
||||||
hasMetadata := devices.hasImage("metadata")
|
hasMetadata := devices.hasImage("metadata")
|
||||||
|
|
||||||
if !doInit && !hasData {
|
if !doInit && !hasData {
|
||||||
return fmt.Error("Looback data file not found")
|
return errors.New("Looback data file not found")
|
||||||
}
|
}
|
||||||
|
|
||||||
if !doInit && !hasMetadata {
|
if !doInit && !hasMetadata {
|
||||||
return fmt.Error("Looback metadata file not found")
|
return errors.New("Looback metadata file not found")
|
||||||
}
|
}
|
||||||
|
|
||||||
createdLoopback := !hasData || !hasMetadata
|
createdLoopback := !hasData || !hasMetadata
|
||||||
|
|
Загрузка…
Ссылка в новой задаче