aboutsummaryrefslogtreecommitdiffstats
path: root/modules/log/stack.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/log/stack.go')
-rw-r--r--modules/log/stack.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/log/stack.go b/modules/log/stack.go
index d4496cff03..9b22e92867 100644
--- a/modules/log/stack.go
+++ b/modules/log/stack.go
@@ -32,19 +32,19 @@ func Stack(skip int) string {
}
// Print equivalent of debug.Stack()
- fmt.Fprintf(buf, "%s:%d (0x%x)\n", filename, lineNumber, programCounter)
+ _, _ = fmt.Fprintf(buf, "%s:%d (0x%x)\n", filename, lineNumber, programCounter)
// Now try to print the offending line
if filename != lastFilename {
data, err := os.ReadFile(filename)
if err != nil {
- // can't read this sourcefile
+ // can't read this source file
// likely we don't have the sourcecode available
continue
}
lines = bytes.Split(data, []byte{'\n'})
lastFilename = filename
}
- fmt.Fprintf(buf, "\t%s: %s\n", functionName(programCounter), source(lines, lineNumber))
+ _, _ = fmt.Fprintf(buf, "\t%s: %s\n", functionName(programCounter), source(lines, lineNumber))
}
return buf.String()
}