aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 {