forked from TrueCloudLab/rclone
... switch from id01/go-lz4 to pierrec/lz4 ... use klauspost/compress/gzip for gzip ... use ulikunitz/xz for xz ... remove snappy
23 lines
351 B
Go
23 lines
351 B
Go
// +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:]...)
|
|
}
|