From b42d0cb1dae89af2211c2283ea45446a225ea646 Mon Sep 17 00:00:00 2001 From: Glyn Normington Date: Thu, 10 Jul 2014 11:50:51 +0100 Subject: [PATCH] Use conventional factory terminology The Initialize method is responsible for creating a new Container instance and calling it Create makes the factory pattern more obvious. Clearly creating a Container instance involves initialising the instance. Docker-DCO-1.1-Signed-off-by: Glyn Normington (github: glyn) --- factory.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/factory.go b/factory.go index fa436aa8..9161ff05 100644 --- a/factory.go +++ b/factory.go @@ -1,7 +1,7 @@ package libcontainer type Factory interface { - // Initializes a new container in the given path. A unique ID is generated for the container and + // Creates a new container in the given path. A unique ID is generated for the container and // starts the initial process inside the container. // // Returns the new container with a running process. @@ -12,7 +12,7 @@ type Factory interface { // System error // // On error, any partially created container parts are cleaned up (the operation is atomic). - Initialize(path string, config *Config) (Container, error) + Create(path string, config *Config) (Container, error) // Load takes the path for an existing container and reconstructs the container // from the state.