Index: worker/uniter/jujuc/relation-get.go |
=== modified file 'worker/uniter/jujuc/relation-get.go' |
--- worker/uniter/jujuc/relation-get.go 2013-10-08 10:43:57 +0000 |
+++ worker/uniter/jujuc/relation-get.go 2014-03-03 12:02:05 +0000 |
@@ -6,6 +6,7 @@ |
import ( |
"fmt" |
+ "github.com/juju/errgo/errors" |
"launchpad.net/gnuflag" |
"launchpad.net/juju-core/cmd" |
@@ -51,7 +52,7 @@ |
func (c *RelationGetCommand) Init(args []string) error { |
if c.RelationId == -1 { |
- return fmt.Errorf("no relation id specified") |
+ return errors.Newf("no relation id specified") |
} |
c.Key = "" |
if len(args) > 0 { |
@@ -68,7 +69,7 @@ |
args = args[1:] |
} |
if c.UnitName == "" { |
- return fmt.Errorf("no unit id specified") |
+ return errors.Newf("no unit id specified") |
} |
return cmd.CheckEmpty(args) |
} |
@@ -76,7 +77,7 @@ |
func (c *RelationGetCommand) Run(ctx *cmd.Context) error { |
r, found := c.ctx.Relation(c.RelationId) |
if !found { |
- return fmt.Errorf("unknown relation id") |
+ return errors.Newf("unknown relation id") |
} |
var settings params.RelationSettings |
if c.UnitName == c.ctx.UnitName() { |