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

Issue 6298081: state: Moved function AssignUnit() to method of State. (Closed)

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

Description

state: Moved function AssignUnit() to method of State. Detected that AssignUnit() is pure function getting a state as first argument doesn't follow the style of the state package. Here we have methods for adding, retrieving or removing entities as methods of state. This also matches for AssignUnit(), so after a short discussion moved it to be a method of State. https://code.launchpad.net/~themue/juju-core/go-state-move-assign-unit/+merge/110302 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : state: Moved function AssignUnit() to method of State. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -34 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M state/state.go View 1 chunk +28 lines, -0 lines 0 comments Download
M state/state_test.go View 1 4 chunks +5 lines, -5 lines 0 comments Download
M state/unit.go View 1 1 chunk +0 lines, -28 lines 0 comments Download
M state/watcher.go View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5
TheMue
Please take a look.
11 years, 11 months ago (2012-06-14 11:33:18 UTC) #1
rog
On 2012/06/14 11:33:18, TheMue wrote: > Please take a look. LGTM
11 years, 11 months ago (2012-06-14 11:34:45 UTC) #2
fwereade
LGTM, thanks.
11 years, 11 months ago (2012-06-14 11:38:34 UTC) #3
niemeyer
Well reviewed already. Please feel free to move ahead and merge it, Frank.
11 years, 11 months ago (2012-06-15 01:18:36 UTC) #4
TheMue
11 years, 11 months ago (2012-06-15 07:34:29 UTC) #5
*** Submitted:

state: Moved function AssignUnit() to method of State.

Detected that AssignUnit() is pure function getting a state
as first argument doesn't follow the style of the state package.
Here we have methods for adding, retrieving or removing entities
as methods of state. This also matches for AssignUnit(), so after
a short discussion moved it to be a method of State.

R=rog, fwereade, niemeyer
CC=
https://codereview.appspot.com/6298081
Sign in to reply to this message.

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