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

Unified Diff: worker/uniter/jujuc/relation-get.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 | « worker/uniter/jujuc/ports.go ('k') | worker/uniter/jujuc/relation-ids.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « worker/uniter/jujuc/ports.go ('k') | worker/uniter/jujuc/relation-ids.go » ('j') | no next file with comments »

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