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

Issue 6302089: state: remove error return from IsPrincipal

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 10 months ago by rog
Modified:
11 years, 10 months ago
Reviewers:
mp+110877
Visibility:
Public.

Description

state: remove error return from IsPrincipal It can no longer fail. https://code.launchpad.net/~rogpeppe/juju-core/state-is-principal-no-error/+merge/110877 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 4

Patch Set 2 : state: remove error return from IsPrincipal #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -25 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M state/service.go View 1 1 chunk +1 line, -5 lines 0 comments Download
M state/state.go View 1 1 chunk +1 line, -3 lines 0 comments Download
M state/state_test.go View 2 chunks +3 lines, -6 lines 0 comments Download
M state/unit.go View 1 chunk +2 lines, -11 lines 0 comments Download

Messages

Total messages: 4
rog
Please take a look.
11 years, 10 months ago (2012-06-18 18:04:11 UTC) #1
fwereade
LGTM
11 years, 10 months ago (2012-06-18 20:27:20 UTC) #2
niemeyer
Very nice, LGTM. https://codereview.appspot.com/6302089/diff/1/state/service.go File state/service.go (right): https://codereview.appspot.com/6302089/diff/1/state/service.go#newcode131 state/service.go:131: if !ok { if !principal.IsPrincipal() { ...
11 years, 10 months ago (2012-06-19 11:28:53 UTC) #3
rog
11 years, 10 months ago (2012-06-19 13:54:44 UTC) #4
*** Submitted:

state: remove error return from IsPrincipal

It can no longer fail.

R=fwereade, niemeyer
CC=
https://codereview.appspot.com/6302089

https://codereview.appspot.com/6302089/diff/1/state/service.go
File state/service.go (right):

https://codereview.appspot.com/6302089/diff/1/state/service.go#newcode131
state/service.go:131: if !ok {
On 2012/06/19 11:28:53, niemeyer wrote:
> if !principal.IsPrincipal() {

Done.

https://codereview.appspot.com/6302089/diff/1/state/state.go
File state/state.go (right):

https://codereview.appspot.com/6302089/diff/1/state/state.go#newcode278
state/state.go:278: return fmt.Errorf("subordinate unit %q cannot be assigned
directly to a machine", u.Name())
On 2012/06/19 11:28:53, niemeyer wrote:
> s/.Name()//

Done.
Sign in to reply to this message.

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