From 65bf7be9958662d7881ee992874889a5dbbe6ef5 Mon Sep 17 00:00:00 2001 From: Samuel Stauffer Date: Wed, 19 Mar 2014 14:27:01 -0700 Subject: Don't capitalize function arguments --- conn.go | 4 ++-- control.go | 26 +++++++++++++------------- ldap.go | 4 ++-- search.go | 8 ++++---- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/conn.go b/conn.go index ebf87c1..d5fbef0 100644 --- a/conn.go +++ b/conn.go @@ -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) } diff --git a/control.go b/control.go index 4466a0b..01eb4da 100644 --- a/control.go +++ b/control.go @@ -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 diff --git a/ldap.go b/ldap.go index bb84279..12711b2 100644 --- a/ldap.go +++ b/ldap.go @@ -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) } diff --git a/search.go b/search.go index 01757ce..f104d8d 100644 --- a/search.go +++ b/search.go @@ -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 "" } -- cgit v1.2.3