mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-22 04:18:53 +00:00
Simplify code slightly be creating a `trace()` function. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
28 lines
459 B
Go
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
|
|
},
|
|
}
|