https://codereview.appspot.com/6248076/diff/5001/state/util.go#newcode26
state/util.go:26: func AssignUnit(st *State, u *Unit, policy
AssignmentPolicy) (err error) {
It's fine to have this as a function in the place where it was. It's a
much better spot than here, as it had all the logic surrounding it just
a glance away.
LGTM, thanks. It'd be nice to move the helper function back where it was
(or around where it was, anyway).
https:/ /codereview. appspot. com/6248076/ diff/5001/ state/state_ test.go
File state/state_test.go (right):
https:/ /codereview. appspot. com/6248076/ diff/5001/ state/state_ test.go# newcode1062 test.go: 1062: func (s *StateSuite) TestAddRelation(c *C) {
state/state_
This shouldn't be here, I suspect.
https:/ /codereview. appspot. com/6248076/ diff/5001/ state/util. go
File state/util.go (right):
https:/ /codereview. appspot. com/6248076/ diff/5001/ state/util. go#newcode26
state/util.go:26: func AssignUnit(st *State, u *Unit, policy
AssignmentPolicy) (err error) {
It's fine to have this as a function in the place where it was. It's a
much better spot than here, as it had all the logic surrounding it just
a glance away.
https:/ /codereview. appspot. com/6248076/