Skip to content

Commit

Permalink
Merge pull request #21 from NexWeb/patch-1
Browse files Browse the repository at this point in the history
Update stack.go Sprintf formatting directives
  • Loading branch information
thrawn01 authored Jul 3, 2018
2 parents a1d7aa3 + f794a5e commit 3df49c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stack/stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type FrameInfo struct {
func GetCallStack(frames errors.StackTrace) string {
var trace []string
for i := len(frames) - 1; i >= 0; i-- {
trace = append(trace, fmt.Sprintf("%n()", frames[i]))
trace = append(trace, fmt.Sprintf("%v", frames[i]))
}
return strings.Join(trace, " ")
}
Expand All @@ -33,7 +33,7 @@ func GetLastFrame(frames errors.StackTrace) FrameInfo {
pc := uintptr(frames[0]) - 1
fn := runtime.FuncForPC(pc)
if fn == nil {
return FrameInfo{Func: fmt.Sprintf("unknown func at %f", pc)}
return FrameInfo{Func: fmt.Sprintf("unknown func at %v", pc)}
}
filePath, lineNo := fn.FileLine(pc)
return FrameInfo{
Expand Down

0 comments on commit 3df49c4

Please sign in to comment.