using `errors.New` instead `fmt.Error`.

This commit is contained in:
Andrews Medina 2013-11-30 01:02:09 -02:00
Родитель a6c9a332d0
Коммит e8437e8fcf
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -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