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

Unified Diff: state/unit.go

Issue 6553051: state: drop kill and Die method names
Patch Set: state: drop kill and Die method names Created 12 years, 6 months 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 | « state/tools_test.go ('k') | state/unit_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: state/unit.go
=== modified file 'state/unit.go'
--- state/unit.go 2012-09-21 18:26:46 +0000
+++ state/unit.go 2012-09-21 20:31:39 +0000
@@ -149,10 +149,10 @@
return nil
}
-// Kill sets the unit lifecycle to Dying if it is Alive.
+// EnsureDying sets the unit lifecycle to Dying if it is Alive.
// It does nothing otherwise.
-func (u *Unit) Kill() error {
- err := ensureLife(u.st, u.st.units, u.doc.Name, Dying, "unit")
+func (u *Unit) EnsureDying() error {
+ err := ensureDying(u.st, u.st.units, u.doc.Name, "unit")
if err != nil {
return err
}
@@ -160,10 +160,10 @@
return nil
}
-// Die sets the unit lifecycle to Dead if it is Alive or Dying.
+// EnsureDead sets the unit lifecycle to Dead if it is Alive or Dying.
// It does nothing otherwise.
-func (u *Unit) Die() error {
- err := ensureLife(u.st, u.st.units, u.doc.Name, Dead, "unit")
+func (u *Unit) EnsureDead() error {
+ err := ensureDead(u.st, u.st.units, u.doc.Name, "unit", nil, "")
if err != nil {
return err
}
« no previous file with comments | « state/tools_test.go ('k') | state/unit_test.go » ('j') | no next file with comments »

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