summaryrefslogtreecommitdiffstats
path: root/control.go
diff options
context:
space:
mode:
authorSamuel Stauffer <samuel@descolada.com>2014-03-19 22:27:01 +0100
committerSamuel Stauffer <samuel@descolada.com>2014-03-19 22:27:01 +0100
commit65bf7be9958662d7881ee992874889a5dbbe6ef5 (patch)
tree0b39cf05bf792d773f4675195402de0fc095ac55 /control.go
parentUse error instead of *Error (diff)
downloadldap-65bf7be9958662d7881ee992874889a5dbbe6ef5.tar
ldap-65bf7be9958662d7881ee992874889a5dbbe6ef5.tar.gz
ldap-65bf7be9958662d7881ee992874889a5dbbe6ef5.tar.bz2
ldap-65bf7be9958662d7881ee992874889a5dbbe6ef5.tar.lz
ldap-65bf7be9958662d7881ee992874889a5dbbe6ef5.tar.xz
ldap-65bf7be9958662d7881ee992874889a5dbbe6ef5.tar.zst
ldap-65bf7be9958662d7881ee992874889a5dbbe6ef5.zip
Diffstat (limited to 'control.go')
-rw-r--r--control.go26
1 files changed, 13 insertions, 13 deletions
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