You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you think short is necessary here for 3 times string copy?,
Maybe we could just file = file[i+1:] ?
I issue this because it is in the l.mu.Lock():)
https://github.com/golang/go/blob/master/src/log/log.go#L121
if l.flag&(Lshortfile|Llongfile) != 0 {
if l.flag&Lshortfile != 0 {
short := file
for i := len(file) - 1; i > 0; i-- {
if file[i] == '/' {
short = file[i+1:]
break
}
}
file = short
}
The text was updated successfully, but these errors were encountered:
Do you think
short
is necessary here for 3 times string copy?,Maybe we could just
file = file[i+1:]
?I issue this because it is in the
l.mu.Lock()
:)The text was updated successfully, but these errors were encountered: