rewrite lang.go format and templateString

surprisingly not much faster than the originals.
This commit is contained in:
Harvey Tindall
2021-03-27 16:07:22 +00:00
parent a0a25d64f1
commit 2451d69341
2 changed files with 43 additions and 10 deletions
+1
View File
@@ -24,6 +24,7 @@ type logger struct {
}
func Lshortfile() string {
// 0 = This function, 1 = Print/Printf/Println, 2 = Caller of Print/Printf/Println
_, file, line, ok := runtime.Caller(2)
lineString := strconv.Itoa(line)
if !ok {