mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
Bump microsoft/hcsshim to v0.8.7
Signed-off-by: ulyssessouza <ulyssessouza@gmail.com>
This commit is contained in:
17
vendor/github.com/Microsoft/hcsshim/internal/oc/span.go
generated
vendored
Normal file
17
vendor/github.com/Microsoft/hcsshim/internal/oc/span.go
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
package oc
|
||||
|
||||
import (
|
||||
"go.opencensus.io/trace"
|
||||
)
|
||||
|
||||
// SetSpanStatus sets `span.SetStatus` to the proper status depending on `err`. If
|
||||
// `err` is `nil` assumes `trace.StatusCodeOk`.
|
||||
func SetSpanStatus(span *trace.Span, err error) {
|
||||
status := trace.Status{}
|
||||
if err != nil {
|
||||
// TODO: JTERRY75 - Handle errors in a non-generic way
|
||||
status.Code = trace.StatusCodeUnknown
|
||||
status.Message = err.Error()
|
||||
}
|
||||
span.SetStatus(status)
|
||||
}
|
Reference in New Issue
Block a user