• 此项目
    • 正在载入...
  • 登录

mmm-go / partnermg · 文件

转到一个项目

GitLab

  • 转到群组
  • 项目
  • 活动
  • 文件
  • 提交
  • 管道 0
  • 构建 0
  • 图表
  • 里程碑
  • 问题 0
  • 合并请求 0
  • 成员
  • 标记
  • 维基
  • 派生
  • 网络
  • 创建新的问题
  • partnermg
  • vendor
  • github.com
  • pierrec
  • lz4
  • debug.go
  • 更新
    4f5343bc
    唐旭辉 在
    2020-10-15 15:17:29 +0800
    提交 浏览目录 »
debug.go 351 字节
原文件 审查 历史 永久链接
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
// +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:]...)
}