mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-21 16:03:32 +01:00
23 lines
334 B
Go
23 lines
334 B
Go
package rpc
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
//nolint:unused
|
|
var debugEnabled bool = false
|
|
|
|
func init() {
|
|
if os.Getenv("ZREPL_RPC_DEBUG") != "" {
|
|
debugEnabled = true
|
|
}
|
|
}
|
|
|
|
//nolint:deadcode,unused
|
|
func debug(format string, args ...interface{}) {
|
|
if debugEnabled {
|
|
fmt.Fprintf(os.Stderr, "rpc: %s\n", fmt.Sprintf(format, args...))
|
|
}
|
|
}
|