mirror of
https://github.com/xvzc/SpoofDPI.git
synced 2024-12-22 22:36:53 +00:00
24 lines
300 B
Go
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:]}
|
|
}
|