summaryrefslogtreecommitdiffstats
path: root/filter.go
diff options
context:
space:
mode:
authorSamuel Stauffer <samuel@descolada.com>2014-03-19 22:22:55 +0100
committerSamuel Stauffer <samuel@descolada.com>2014-03-19 22:22:55 +0100
commit2eea0c0a703e32b904741d52c9e2c9ae836c14b0 (patch)
tree10820142494033c3d3297249ab31efe0176aec77 /filter.go
parentShort writes don't happen without an error so don't loop (diff)
downloadldap-2eea0c0a703e32b904741d52c9e2c9ae836c14b0.tar
ldap-2eea0c0a703e32b904741d52c9e2c9ae836c14b0.tar.gz
ldap-2eea0c0a703e32b904741d52c9e2c9ae836c14b0.tar.bz2
ldap-2eea0c0a703e32b904741d52c9e2c9ae836c14b0.tar.lz
ldap-2eea0c0a703e32b904741d52c9e2c9ae836c14b0.tar.xz
ldap-2eea0c0a703e32b904741d52c9e2c9ae836c14b0.tar.zst
ldap-2eea0c0a703e32b904741d52c9e2c9ae836c14b0.zip
Diffstat (limited to '')
-rw-r--r--filter.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/filter.go b/filter.go
index 9d01d28..63f5d07 100644
--- a/filter.go
+++ b/filter.go
@@ -49,7 +49,7 @@ var FilterSubstringsMap = map[uint64]string{
FilterSubstringsFinal: "Substrings Final",
}
-func CompileFilter(filter string) (*ber.Packet, *Error) {
+func CompileFilter(filter string) (*ber.Packet, error) {
if len(filter) == 0 || filter[0] != '(' {
return nil, NewError(ErrorFilterCompile, errors.New("ldap: filter does not start with an '('"))
}
@@ -63,7 +63,7 @@ func CompileFilter(filter string) (*ber.Packet, *Error) {
return packet, nil
}
-func DecompileFilter(packet *ber.Packet) (ret string, err *Error) {
+func DecompileFilter(packet *ber.Packet) (ret string, err error) {
defer func() {
if r := recover(); r != nil {
err = NewError(ErrorFilterDecompile, errors.New("ldap: error decompiling filter"))
@@ -136,7 +136,7 @@ func DecompileFilter(packet *ber.Packet) (ret string, err *Error) {
return
}
-func compileFilterSet(filter string, pos int, parent *ber.Packet) (int, *Error) {
+func compileFilterSet(filter string, pos int, parent *ber.Packet) (int, error) {
for pos < len(filter) && filter[pos] == '(' {
child, newPos, err := compileFilter(filter, pos+1)
if err != nil {
@@ -152,9 +152,9 @@ func compileFilterSet(filter string, pos int, parent *ber.Packet) (int, *Error)
return pos + 1, nil
}
-func compileFilter(filter string, pos int) (*ber.Packet, int, *Error) {
+func compileFilter(filter string, pos int) (*ber.Packet, int, error) {
var packet *ber.Packet
- var err *Error
+ var err error
defer func() {
if r := recover(); r != nil {