~cmars/juju-core/1.14-azure-compile-error

« back to all changes in this revision

Viewing changes to environs/local/storage.go

Move common errors to erros package and remove dupe NotFoundError struct

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
        "io"
9
9
        "io/ioutil"
10
10
        "launchpad.net/juju-core/environs"
 
11
        "launchpad.net/juju-core/errors"
11
12
        "net/http"
12
13
        "sort"
13
14
        "strings"
41
42
                return nil, err
42
43
        }
43
44
        if resp.StatusCode != 200 {
44
 
                return nil, &environs.NotFoundError{fmt.Errorf("file %q not found", name)}
 
45
                return nil, errors.NotFoundf("file %q not found", name)
45
46
        }
46
47
        return resp.Body, nil
47
48
}