diff options
-rw-r--r-- | conn.go | 4 | ||||
-rw-r--r-- | control.go | 26 | ||||
-rw-r--r-- | ldap.go | 4 | ||||
-rw-r--r-- | search.go | 8 |
4 files changed, 21 insertions, 21 deletions
@@ -173,13 +173,13 @@ func (l *Conn) sendMessage(packet *ber.Packet) (chan *ber.Packet, error) { return out, nil } -func (l *Conn) finishMessage(MessageID uint64) { +func (l *Conn) finishMessage(messageID uint64) { if l.isClosing { return } message := &messagePacket{ Op: MessageFinish, - MessageID: MessageID, + MessageID: messageID, } l.sendProcessMessage(message) } @@ -84,13 +84,13 @@ func (c *ControlPaging) String() string { c.Cookie) } -func (c *ControlPaging) SetCookie(Cookie []byte) { - c.Cookie = Cookie +func (c *ControlPaging) SetCookie(cookie []byte) { + c.Cookie = cookie } -func FindControl(Controls []Control, ControlType string) Control { - for _, c := range Controls { - if c.GetControlType() == ControlType { +func FindControl(controls []Control, controlType string) Control { + for _, c := range controls { + if c.GetControlType() == controlType { return c } } @@ -136,21 +136,21 @@ func DecodeControl(packet *ber.Packet) Control { return c } -func NewControlString(ControlType string, Criticality bool, ControlValue string) *ControlString { +func NewControlString(controlType string, criticality bool, controlValue string) *ControlString { return &ControlString{ - ControlType: ControlType, - Criticality: Criticality, - ControlValue: ControlValue, + ControlType: controlType, + Criticality: criticality, + ControlValue: controlValue, } } -func NewControlPaging(PagingSize uint32) *ControlPaging { - return &ControlPaging{PagingSize: PagingSize} +func NewControlPaging(pagingSize uint32) *ControlPaging { + return &ControlPaging{PagingSize: pagingSize} } -func encodeControls(Controls []Control) *ber.Packet { +func encodeControls(controls []Control) *ber.Packet { packet := ber.Encode(ber.ClassContext, ber.TypeConstructed, 0, nil, "Controls") - for _, control := range Controls { + for _, control := range controls { packet.AppendChild(control.Encode()) } return packet @@ -264,8 +264,8 @@ func addDefaultLDAPResponseDescriptions(packet *ber.Packet) { } } -func DebugBinaryFile(FileName string) error { - file, err := ioutil.ReadFile(FileName) +func DebugBinaryFile(fileName string) error { + file, err := ioutil.ReadFile(fileName) if err != nil { return NewError(ErrorDebugging, err) } @@ -98,17 +98,17 @@ type Entry struct { Attributes []*EntryAttribute } -func (e *Entry) GetAttributeValues(Attribute string) []string { +func (e *Entry) GetAttributeValues(attribute string) []string { for _, attr := range e.Attributes { - if attr.Name == Attribute { + if attr.Name == attribute { return attr.Values } } return []string{} } -func (e *Entry) GetAttributeValue(Attribute string) string { - values := e.GetAttributeValues(Attribute) +func (e *Entry) GetAttributeValue(attribute string) string { + values := e.GetAttributeValues(attribute) if len(values) == 0 { return "" } |