mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-24 01:24:26 +01:00
tracing: Create trace function
Simplify code slightly be creating a `trace()` function. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
opentracing "github.com/opentracing/opentracing-go"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
@@ -19,7 +18,7 @@ var versionCLICommand = cli.Command{
|
||||
return err
|
||||
}
|
||||
|
||||
span, _ := opentracing.StartSpanFromContext(ctx, "version")
|
||||
span, _ := trace(ctx, "version")
|
||||
defer span.Finish()
|
||||
|
||||
cli.VersionPrinter(context)
|
||||
|
||||
Reference in New Issue
Block a user