mirror of
https://github.com/zrepl/zrepl.git
synced 2024-12-01 12:55:21 +01:00
22 lines
343 B
Go
22 lines
343 B
Go
package dataconn
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
var debugEnabled bool = false
|
|
|
|
func init() {
|
|
if os.Getenv("ZREPL_RPC_DATACONN_DEBUG") != "" {
|
|
debugEnabled = true
|
|
}
|
|
}
|
|
|
|
//nolint[:deadcode,unused]
|
|
func debug(format string, args ...interface{}) {
|
|
if debugEnabled {
|
|
fmt.Fprintf(os.Stderr, "rpc/dataconn: %s\n", fmt.Sprintf(format, args...))
|
|
}
|
|
}
|