mirror of
https://github.com/garraflavatra/go-fmp.git
synced 2025-06-27 20:15:11 +00:00
Debug flag
This commit is contained in:
@ -5,22 +5,30 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const debugging = false
|
||||||
|
|
||||||
func debug(str string, args ...interface{}) {
|
func debug(str string, args ...interface{}) {
|
||||||
// fmt.Printf(str+"\n", args...)
|
if debugging {
|
||||||
|
fmt.Printf(str+"\n", args...)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func dump(data []byte) {
|
func dump(data []byte) {
|
||||||
for _, b := range data {
|
if debugging {
|
||||||
fmt.Printf("%02x ", b)
|
for _, b := range data {
|
||||||
|
fmt.Printf("%02x ", b)
|
||||||
|
}
|
||||||
|
fmt.Println()
|
||||||
}
|
}
|
||||||
fmt.Println()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func dumpPath(path []uint64) {
|
func dumpPath(path []uint64) {
|
||||||
for _, p := range path {
|
if debugging {
|
||||||
fmt.Printf("%v. ", p)
|
for _, p := range path {
|
||||||
|
fmt.Printf("%v. ", p)
|
||||||
|
}
|
||||||
|
fmt.Println()
|
||||||
}
|
}
|
||||||
fmt.Println()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *FmpFile) ToDebugFile(fname string) {
|
func (f *FmpFile) ToDebugFile(fname string) {
|
||||||
|
Reference in New Issue
Block a user