Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(58)

Unified Diff: environs/manual/bootstrap.go

Issue 70770043: all: use errgo instead of fmt.Errorf
Patch Set: all: use errgo instead of fmt.Errorf Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « environs/jujutest/livetests.go ('k') | environs/manual/init.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: environs/manual/bootstrap.go
=== modified file 'environs/manual/bootstrap.go'
--- environs/manual/bootstrap.go 2014-02-20 02:24:46 +0000
+++ environs/manual/bootstrap.go 2014-03-03 12:02:05 +0000
@@ -4,9 +4,10 @@
package manual
import (
- "errors"
"fmt"
+ "github.com/juju/errgo/errors"
+
"launchpad.net/juju-core/constraints"
"launchpad.net/juju-core/environs"
"launchpad.net/juju-core/environs/bootstrap"
@@ -37,7 +38,7 @@
}
func errMachineIdInvalid(machineId string) error {
- return fmt.Errorf("%q is not a valid machine ID", machineId)
+ return errors.Newf("%q is not a valid machine ID", machineId)
}
// NewManualBootstrapEnviron wraps a LocalStorageEnviron with another which
@@ -68,7 +69,7 @@
provisioned, err := checkProvisioned(args.Host)
if err != nil {
- return fmt.Errorf("failed to check provisioned status: %v", err)
+ return errors.Notef(err, "failed to check provisioned status")
}
if provisioned {
return ErrProvisioned
« no previous file with comments | « environs/jujutest/livetests.go ('k') | environs/manual/init.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b