Update code based on review comments

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
This commit is contained in:
Michael Crosby
2014-06-24 17:17:41 -07:00
parent 854bcc0f7e
commit 77dcaac129
3 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -14,9 +14,9 @@ type State struct {
Pid1StartTime string `json:"pid1_start_time,omitempty"`
}
// WriteState writes the container's runtime state to a state.json file
// SaveState writes the container's runtime state to a state.json file
// in the specified path
func WriteState(basePath string, state *State) error {
func SaveState(basePath string, state *State) error {
f, err := os.Create(filepath.Join(basePath, "state.json"))
if err != nil {
return err
@@ -26,8 +26,8 @@ func WriteState(basePath string, state *State) error {
return json.NewEncoder(f).Encode(state)
}
// LoadState reads the state.json file for a running container
func LoadState(basePath string) (*State, error) {
// GetState reads the state.json file for a running container
func GetState(basePath string) (*State, error) {
f, err := os.Open(filepath.Join(basePath, "state.json"))
if err != nil {
return nil, err