From 4083fc0161bcf1a669ad0af50145ed92c8b776ce Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Fri, 25 Sep 2015 22:43:12 +0200 Subject: minor tweaking --- ber/new/dump.go | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'ber/new/dump.go') diff --git a/ber/new/dump.go b/ber/new/dump.go index 8293fa5..42ca123 100644 --- a/ber/new/dump.go +++ b/ber/new/dump.go @@ -12,19 +12,15 @@ func (s *state) dump(ident int) string { if s.Len() == 0 { return "" } + fmt.Printf("%x %x\n", s.Len(), s.Bytes()) h := s.ident() fmt.Printf("%*s", 2*ident, "") - fmt.Printf("%v %x\n", h, s.Bytes()) - if h.Kind == kindConstructed { - return s.subState().dump(ident + 1) - } - switch h.Tag { - case tagInteger: - fmt.Println(h.Tag, s.unmarshalInt()) - // here be dragons - } + fmt.Println(h) for s.Len() > 0 { - s.dump(ident) + if h.Kind == kindConstructed { + return s.subState().dump(ident + 1) + } + s.next() } return "" } -- cgit v1.2.3