mirror of
https://gitee.com/johng/gf
synced 2026-07-04 13:02:36 +08:00
新增go modules支持,自行管理第三方包依赖,方便开发者使用
This commit is contained in:
21
third/github.com/pierrec/lz4/debug.go
Normal file
21
third/github.com/pierrec/lz4/debug.go
Normal file
@ -0,0 +1,21 @@
|
||||
// +build lz4debug
|
||||
|
||||
package lz4
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
func debug(args ...interface{}) {
|
||||
_, file, line, _ := runtime.Caller(1)
|
||||
file = filepath.Base(file)
|
||||
|
||||
f := fmt.Sprintf("LZ4: %s:%d %s", file, line, args[0])
|
||||
if f[len(f)-1] != '\n' {
|
||||
f += "\n"
|
||||
}
|
||||
fmt.Fprintf(os.Stderr, f, args[1:]...)
|
||||
}
|
||||
Reference in New Issue
Block a user