SpoofDPI/util/util.go
2022-01-09 00:09:01 +09:00

24 lines
300 B
Go

package util
import (
"log"
"github.com/xvzc/SpoofDPI/config"
)
func Debug(v ...interface{}) {
if config.GetConfig().Debug == false {
return
}
log.Println(v...)
}
func BytesToChunks(buf []byte) [][]byte {
if len(buf) < 1 {
return [][]byte{buf}
}
return [][]byte{buf[:1], buf[1:]}
}