mirror of
https://github.com/containers/skopeo.git
synced 2025-08-29 03:22:43 +00:00
Bumps [github.com/containers/buildah](https://github.com/containers/buildah) from 1.11.4 to 1.11.5. - [Release notes](https://github.com/containers/buildah/releases) - [Changelog](https://github.com/containers/buildah/blob/master/CHANGELOG.md) - [Commits](https://github.com/containers/buildah/compare/v1.11.4...v1.11.5) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
18 lines
431 B
Go
18 lines
431 B
Go
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)
|
|
}
|