summaryrefslogtreecommitdiffstats
path: root/examples/modify.go
diff options
context:
space:
mode:
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{})