aboutsummaryrefslogtreecommitdiff
path: root/ber
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-06-29 17:47:25 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-06-29 17:47:25 +0200
commit32b13fbd8336f301ea99fe1c046569e193e99d14 (patch)
tree2098f05a4baefd1608ad3c36e1e5a6f751383718 /ber
parentbe5e4e88fbd01f7e53d8e7c03f7c845f81b96783 (diff)
Order examples
Diffstat (limited to 'ber')
-rw-r--r--ber/class_test.go17
1 files changed, 11 insertions, 6 deletions
diff --git a/ber/class_test.go b/ber/class_test.go
index 252d7ae..5803e28 100644
--- a/ber/class_test.go
+++ b/ber/class_test.go
@@ -3,7 +3,11 @@ package ber
import "fmt"
func ExampleIdent() {
- b := []byte{0x60, 0xA1, 0x02, 0x30, 0x0A, 0x80, 0x7E, 0x04, 0xBE}
+ b := []byte{
+ 0x02, 0x04, 0x0A, 0x30,
+ 0x40, 0x61, 0x7E,
+ 0x80, 0xA1, 0xBE,
+ }
for _, v := range b {
c, k, t := Ident(v)
if c == Universal {
@@ -15,13 +19,14 @@ func ExampleIdent() {
}
}
// Output:
- // 0x60: Application Constructed 0x00
- // 0xA1: Context-specific Constructed 0x01
// 0x02: Universal Primitive Integer
- // 0x30: Universal Constructed Sequence / Of
+ // 0x04: Universal Primitive Octet String
// 0x0A: Universal Primitive Enumerated
- // 0x80: Context-specific Primitive 0x00
+ // 0x30: Universal Constructed Sequence / Of
+ // 0x40: Application Primitive 0x00
+ // 0x61: Application Constructed 0x01
// 0x7E: Application Constructed 0x1E
- // 0x04: Universal Primitive Octet String
+ // 0x80: Context-specific Primitive 0x00
+ // 0xA1: Context-specific Constructed 0x01
// 0xBE: Context-specific Constructed 0x1E
}