summaryrefslogtreecommitdiffstats
path: root/examples/modify.go
diff options
context:
space:
mode:
authorjuju2013 <catherinedesienne@gmail.com>2014-04-18 16:08:45 +0200
committerjuju2013 <catherinedesienne@gmail.com>2014-04-18 16:08:45 +0200
commitf4a7f67426c9fd7eecc5f54bce77fad7257daf36 (patch)
treed487b0ebd2663d4653a229e9297f3e82643b18bb /examples/modify.go
parentmake examples search works (diff)
downloadldap-f4a7f67426c9fd7eecc5f54bce77fad7257daf36.tar
ldap-f4a7f67426c9fd7eecc5f54bce77fad7257daf36.tar.gz
ldap-f4a7f67426c9fd7eecc5f54bce77fad7257daf36.tar.bz2
ldap-f4a7f67426c9fd7eecc5f54bce77fad7257daf36.tar.lz
ldap-f4a7f67426c9fd7eecc5f54bce77fad7257daf36.tar.xz
ldap-f4a7f67426c9fd7eecc5f54bce77fad7257daf36.tar.zst
ldap-f4a7f67426c9fd7eecc5f54bce77fad7257daf36.zip
Diffstat (limited to 'examples/modify.go')
-rw-r--r--examples/modify.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/modify.go b/examples/modify.go
index 25eae67..177fe8d 100644
--- a/examples/modify.go
+++ b/examples/modify.go
@@ -9,7 +9,7 @@ import (
"fmt"
"log"
- "github.com/johnweldon/ldap"
+ "github.com/juju2013/goldap"
)
var (
@@ -31,7 +31,7 @@ func search(l *ldap.Conn, filter string, attributes []string) (*ldap.Entry, *lda
sr, err := l.Search(search)
if err != nil {
- log.Fatalf("ERROR: %s\n", err.String())
+ log.Fatalf("ERROR: %s\n", err)
return nil, err
}
@@ -45,7 +45,7 @@ func search(l *ldap.Conn, filter string, attributes []string) (*ldap.Entry, *lda
func main() {
l, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", LdapServer, LdapPort))
if err != nil {
- log.Fatalf("ERROR: %s\n", err.String())
+ log.Fatalf("ERROR: %s\n", err.Error())
}
defer l.Close()
// l.Debug = true
@@ -64,7 +64,7 @@ func main() {
modify.Add("description", []string{"Captain of the USS Enterprise"})
modify.Replace("mail", []string{"captain@enterprise.org"})
if err := l.Modify(modify); err != nil {
- log.Fatalf("ERROR: %s\n", err.String())
+ log.Fatalf("ERROR: %s\n", err.Error())
}
entry, err = search(l, Filter, []string{})
@@ -78,7 +78,7 @@ func main() {
modify.Delete("description", []string{})
modify.Replace("mail", []string{"james.kirk@enterprise.org"})
if err := l.Modify(modify); err != nil {
- log.Fatalf("ERROR: %s\n", err.String())
+ log.Fatalf("ERROR: %s\n", err.Error())
}
entry, err = search(l, Filter, []string{})