aboutsummaryrefslogtreecommitdiff
path: root/ber/obj.go
diff options
context:
space:
mode:
Diffstat (limited to 'ber/obj.go')
-rw-r--r--ber/obj.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/ber/obj.go b/ber/obj.go
index ff8aef8..5482cd1 100644
--- a/ber/obj.go
+++ b/ber/obj.go
@@ -1,5 +1,7 @@
package ber
+type Obj []int
+
func base128(n int) (b []byte) {
if n == 0 {
return []byte{0}
@@ -23,7 +25,7 @@ func debase128(b []byte) int {
return 0
}
-func marshalObj(obj []int) (b []byte) {
+func marshalObj(obj Obj) (b []byte) {
if len(obj) < 2 || obj[0] > 2 {
return []byte{}
}
@@ -38,6 +40,6 @@ func marshalObj(obj []int) (b []byte) {
return b
}
-func unmarshalObj(b []byte) []int {
- return []int{}
+func unmarshalObj(b []byte) Obj {
+ return Obj{}
}