aboutsummaryrefslogtreecommitdiff
path: root/ber/dump.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-10-07 17:45:00 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-10-07 17:45:00 +0200
commit66ba61dbed05d27cd6cb632364d568f5d7eb4063 (patch)
tree16cd9e33cfe0811680d104d5c8459ddfe1e4bb29 /ber/dump.go
parent5f3df5f1df86d1cd1f9881bd0c6e8e4324fbdb65 (diff)
Simplify
Diffstat (limited to 'ber/dump.go')
-rw-r--r--ber/dump.go12
1 files changed, 3 insertions, 9 deletions
diff --git a/ber/dump.go b/ber/dump.go
index fd1e45b..d207366 100644
--- a/ber/dump.go
+++ b/ber/dump.go
@@ -36,18 +36,12 @@ func (s *state) dump(indent int) (ret string) {
case kindPrimitive:
switch h.Class {
case classUniversal:
- ret += fmt.Sprintln(h.Tag, "=", s.universal(h))
+ ret += fmt.Sprintln(h, "=", s.universal(h))
default:
- ret += fmt.Sprintln(h.Class, int(h.Tag), "=",
- s.next())
+ ret += fmt.Sprintln(h, "=", s.next())
}
case kindConstructed:
- switch h.Class {
- case classUniversal:
- ret += fmt.Sprintln(h.Tag, "→")
- default:
- ret += fmt.Sprintln(h.Class, int(h.Tag), "→")
- }
+ ret += fmt.Sprintln(h, "→")
ret += s.subState().dump(indent + 1)
}
}