diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-02-03 07:01:23 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-03 07:01:23 -0500 |
commit | 4ce8b1281e69b55b6024e87f2dec06638c678f10 (patch) | |
tree | f28c6cc0194be1fce4efab76583b02cc4be9586e /vendor/golang.org/x/xerrors/frame.go | |
parent | a086f601e306e7eac94826d5cc368d6220535074 (diff) | |
parent | c40cd1be9828c58193f1f4c3b17cab908718be00 (diff) | |
download | podman-4ce8b1281e69b55b6024e87f2dec06638c678f10.tar.gz podman-4ce8b1281e69b55b6024e87f2dec06638c678f10.tar.bz2 podman-4ce8b1281e69b55b6024e87f2dec06638c678f10.zip |
Merge pull request #9197 from containers/dependabot/go_modules/github.com/onsi/gomega-1.10.5
Bump github.com/onsi/gomega from 1.10.4 to 1.10.5
Diffstat (limited to 'vendor/golang.org/x/xerrors/frame.go')
-rw-r--r-- | vendor/golang.org/x/xerrors/frame.go | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/vendor/golang.org/x/xerrors/frame.go b/vendor/golang.org/x/xerrors/frame.go deleted file mode 100644 index 0de628ec5..000000000 --- a/vendor/golang.org/x/xerrors/frame.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xerrors - -import ( - "runtime" -) - -// A Frame contains part of a call stack. -type Frame struct { - // Make room for three PCs: the one we were asked for, what it called, - // and possibly a PC for skipPleaseUseCallersFrames. See: - // https://go.googlesource.com/go/+/032678e0fb/src/runtime/extern.go#169 - frames [3]uintptr -} - -// Caller returns a Frame that describes a frame on the caller's stack. -// The argument skip is the number of frames to skip over. -// Caller(0) returns the frame for the caller of Caller. -func Caller(skip int) Frame { - var s Frame - runtime.Callers(skip+1, s.frames[:]) - return s -} - -// location reports the file, line, and function of a frame. -// -// The returned function may be "" even if file and line are not. -func (f Frame) location() (function, file string, line int) { - frames := runtime.CallersFrames(f.frames[:]) - if _, ok := frames.Next(); !ok { - return "", "", 0 - } - fr, ok := frames.Next() - if !ok { - return "", "", 0 - } - return fr.Function, fr.File, fr.Line -} - -// Format prints the stack as error detail. -// It should be called from an error's Format implementation -// after printing any other error detail. -func (f Frame) Format(p Printer) { - if p.Detail() { - function, file, line := f.location() - if function != "" { - p.Printf("%s\n ", function) - } - if file != "" { - p.Printf("%s:%d\n", file, line) - } - } -} |