aboutsummaryrefslogtreecommitdiff
path: root/ber/new/dump.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-09-25 22:43:12 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-09-25 22:43:12 +0200
commit4083fc0161bcf1a669ad0af50145ed92c8b776ce (patch)
treeb6fa593bce22b755839f31535d9337077d24ff3e /ber/new/dump.go
parentdc9820adf986a2dacce8c179e060c43a1653f6c6 (diff)
minor tweaking
Diffstat (limited to 'ber/new/dump.go')
-rw-r--r--ber/new/dump.go16
1 files changed, 6 insertions, 10 deletions
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 ""
}