update golang
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
andrey1s
2022-03-13 11:56:49 +03:00
parent 21c14e24be
commit 615c6b7cd6
15 changed files with 165 additions and 138 deletions

View File

@@ -8,13 +8,13 @@ import (
func Caller(depth int, full bool) string {
const offset = 4
_, file, line, ok := runtime.Caller(depth + offset)
_, file, line, has := runtime.Caller(depth + offset)
if !ok {
if !has {
file, line = "???", 0
}
if !full && ok {
if !full && has {
file = filepath.Base(file)
}