From a4459d1d02162b1b34a886c6745a61b47a789807 Mon Sep 17 00:00:00 2001 From: zhouhao Date: Mon, 15 May 2017 13:58:07 +0800 Subject: [PATCH] cmd: small fixes Signed-off-by: zhouhao --- cmd/oci-image-tool/create.go | 4 ++-- cmd/oci-image-tool/unpack.go | 4 ++-- cmd/oci-image-tool/validate.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/oci-image-tool/create.go b/cmd/oci-image-tool/create.go index a995ac7..8f91d2e 100644 --- a/cmd/oci-image-tool/create.go +++ b/cmd/oci-image-tool/create.go @@ -34,7 +34,7 @@ type bundleCmd struct { root string } -func createHandle(context *cli.Context) error { +func createAction(context *cli.Context) error { if len(context.Args()) != 2 { return fmt.Errorf("both src and dest must be provided") } @@ -76,7 +76,7 @@ func createHandle(context *cli.Context) error { var createCommand = cli.Command{ Name: "create", Usage: "Create an OCI image runtime bundle", - Action: createHandle, + Action: createAction, Flags: []cli.Flag{ cli.StringFlag{ Name: "type", diff --git a/cmd/oci-image-tool/unpack.go b/cmd/oci-image-tool/unpack.go index ac18921..bdaaa54 100644 --- a/cmd/oci-image-tool/unpack.go +++ b/cmd/oci-image-tool/unpack.go @@ -33,7 +33,7 @@ type unpackCmd struct { ref string } -func unpackHandle(context *cli.Context) error { +func unpackAction(context *cli.Context) error { if len(context.Args()) != 2 { return fmt.Errorf("both src and dest must be provided") } @@ -72,7 +72,7 @@ func unpackHandle(context *cli.Context) error { var unpackCommand = cli.Command{ Name: "unpack", Usage: "Unpack an image or image source layout", - Action: unpackHandle, + Action: unpackAction, Flags: []cli.Flag{ cli.StringFlag{ Name: "type", diff --git a/cmd/oci-image-tool/validate.go b/cmd/oci-image-tool/validate.go index a0f9a32..d76a14e 100644 --- a/cmd/oci-image-tool/validate.go +++ b/cmd/oci-image-tool/validate.go @@ -43,7 +43,7 @@ type validateCmd struct { var v validateCmd -func validateHandler(context *cli.Context) error { +func validateAction(context *cli.Context) error { if len(context.Args()) < 1 { return fmt.Errorf("no files specified") } @@ -129,7 +129,7 @@ func validatePath(name string) error { var validateCommand = cli.Command{ Name: "validate", Usage: "Validate one or more image files", - Action: validateHandler, + Action: validateAction, Flags: []cli.Flag{ cli.StringFlag{ Name: "type",