From 05a23e25e12825874090a603ca2dd9babcdb61e5 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Sun, 23 Jan 2011 18:06:42 +0100 Subject: [PATCH] nicer verbose output --- _examples/funkensturm/funkensturm.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/_examples/funkensturm/funkensturm.go b/_examples/funkensturm/funkensturm.go index 118b8d4b..3c7f5b7f 100644 --- a/_examples/funkensturm/funkensturm.go +++ b/_examples/funkensturm/funkensturm.go @@ -79,7 +79,8 @@ func doFunkensturm(i []byte) ([]byte, os.Error) { } if *verbose { fmt.Printf(">>>>>> ORIGINAL INCOMING\n") - fmt.Printf("%v\n", pkt) + fmt.Printf("%v", pkt) + fmt.Printf("<<<<<< ORIGINAL INCOMING\n") } if pkt.MsgHdr.Response == true { return nil, &dns.Error{Error: "Response bit set, not replying"} @@ -101,7 +102,8 @@ func doFunkensturm(i []byte) ([]byte, os.Error) { } if *verbose { fmt.Printf(">>>>>> MODIFIED INCOMING\n") - fmt.Printf("%v\n", pkt1) + fmt.Printf("%v", pkt1) + fmt.Printf("<<<<<< MODIFIED INCOMING\n") } // Loop through the Actions.Func* and do something with the @@ -118,7 +120,8 @@ func doFunkensturm(i []byte) ([]byte, os.Error) { if *verbose { fmt.Printf(">>>>>> ORIGINAL OUTGOING\n") - fmt.Printf("%v\n", resultpkt) + fmt.Printf("%v", resultpkt) + fmt.Printf("<<<<<< ORIGINAL OUTGOING\n") } // loop again for matching, but now with OUT, this is done @@ -132,7 +135,8 @@ func doFunkensturm(i []byte) ([]byte, os.Error) { if *verbose { fmt.Printf(">>>>>> MODIFIED OUTGOING\n") - fmt.Printf("%v\n", pkt1) + fmt.Printf("%v", pkt1) + fmt.Printf("<<<<<< MODIFIED OUTGOING\n") } out, ok1 := pkt1.Pack()