From 83744f5d7068c4af05783a5c8ce3851b24c4452d Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 27 Jun 2015 23:26:45 +0200 Subject: Rename Identifier to Kind --- ber/class.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ber/class.go') diff --git a/ber/class.go b/ber/class.go index c2e31b6..b3a0ebf 100644 --- a/ber/class.go +++ b/ber/class.go @@ -22,23 +22,23 @@ var classNames = map[Class]string{ func (c Class) String() string { return classNames[c] } -type Identifier byte +type Kind byte const ( - Primitive Identifier = iota << 5 + Primitive Kind = iota << 5 Constructed ) // 0010 0000 // 2 0 -const IdentifierMask Identifier = 1 << 5 +const KindMask Kind = 1 << 5 -var identifierNames = map[Identifier]string{ +var kindNames = map[Kind]string{ Primitive: "Primitive", Constructed: "Constructed", } -func (i Identifier) String() string { return identifierNames[i] } +func (k Kind) String() string { return kindNames[k] } type Tag byte @@ -114,8 +114,8 @@ var tagNames = map[Tag]string{ func (t Tag) String() string { return tagNames[t] } -func Ident(b byte) (Class, Identifier, Tag) { +func Ident(b byte) (Class, Kind, Tag) { return Class(b) & ClassMask, - Identifier(b) & IdentifierMask, + Kind(b) & KindMask, Tag(b) & TagMask } -- cgit v1.2.3