aboutsummaryrefslogtreecommitdiff
path: root/parse
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-06-30 19:52:17 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-06-30 19:52:17 +0200
commit00b97dda942969fa440b75c5b398d2f8cb748a14 (patch)
treebe3633dae58dcbf7cf190fe142c808be029af8dd /parse
parent23415a7aa44ec884b1929c5b7ebb7cf2d37421a4 (diff)
Shroten output
Diffstat (limited to 'parse')
-rw-r--r--parse/parse.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/parse/parse.go b/parse/parse.go
index cbaebfb..eb67e8a 100644
--- a/parse/parse.go
+++ b/parse/parse.go
@@ -20,10 +20,18 @@ func dump(b []byte, indent int) {
case ber.ObjectIdentifier:
fmt.Println(tag, ber.UnmarshalOID(value))
default:
- fmt.Println(tag, kind, value)
+ if len(value) > 5 {
+ fmt.Println(tag, kind, value[:5], "...")
+ } else {
+ fmt.Println(tag, kind, value)
+ }
}
default:
- fmt.Println(class, kind, byte(tag), value)
+ if len(value) > 5 {
+ fmt.Println(class, kind, byte(tag), value[:5], "...")
+ } else {
+ fmt.Println(class, kind, byte(tag), value)
+ }
}
if len(value) > 0 && kind != ber.Primitive {