mirror of https://github.com/go-gitea/gitea
Git with a cup of tea, painless self-hosted git service
Mirror for internal git.with.parts use
https://git.with.parts
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
351 B
24 lines
351 B
5 years ago
|
// +build lz4debug
|
||
|
|
||
|
package lz4
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"os"
|
||
|
"path/filepath"
|
||
|
"runtime"
|
||
|
)
|
||
|
|
||
|
const debugFlag = true
|
||
|
|
||
|
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:]...)
|
||
|
}
|