Files
kata-containers/cli/version.go
James O. D. Hunt f0073bec2f tracing: Create trace function
Simplify code slightly be creating a `trace()` function.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-08-22 08:24:58 +01:00

28 lines
459 B
Go

// Copyright (c) 2017 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0
//
package main
import (
"github.com/urfave/cli"
)
var versionCLICommand = cli.Command{
Name: "version",
Usage: "display version details",
Action: func(context *cli.Context) error {
ctx, err := cliContextToContext(context)
if err != nil {
return err
}
span, _ := trace(ctx, "version")
defer span.Finish()
cli.VersionPrinter(context)
return nil
},
}