From baa307cd4b7172957a7ca7e16f06489a48a3f701 Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Tue, 21 Feb 2017 15:27:12 -0800 Subject: [PATCH] cmd/containerd: remove cli.Context dependence for content.Store We've moved to using the config, directly. This removes the argument and gets rid of a few extra lines of code. Signed-off-by: Stephen J Day --- cmd/containerd/main.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cmd/containerd/main.go b/cmd/containerd/main.go index 9002b5d..ba19aad 100644 --- a/cmd/containerd/main.go +++ b/cmd/containerd/main.go @@ -90,17 +90,16 @@ func main() { } serveMetricsAPI() - contentStore, err := resolveContentStore(context) + contentStore, err := resolveContentStore() if err != nil { return err } - contentService := content.NewService(contentStore) // start the GRPC api with the execution service registered server := newGRPCServer() api.RegisterContainerServiceServer(server, execution.New(supervisor)) - contentapi.RegisterContentServer(server, contentService) + contentapi.RegisterContentServer(server, content.NewService(contentStore)) // start the GRPC api with registered services if err := serveGRPC(server); err != nil { @@ -204,7 +203,7 @@ func serveDebugAPI() error { return nil } -func resolveContentStore(context *cli.Context) (*content.Store, error) { +func resolveContentStore() (*content.Store, error) { cp := filepath.Join(conf.Root, "content") return content.NewStore(cp) }