summaryrefslogtreecommitdiffstats
path: root/examples
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
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')
-rw-r--r--examples/modify.go10
-rw-r--r--examples/search.go2
-rw-r--r--examples/searchSSL.go2
-rw-r--r--examples/searchTLS.go6
4 files changed, 10 insertions, 10 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{})
diff --git a/examples/search.go b/examples/search.go
index 9618123..59a0333 100644
--- a/examples/search.go
+++ b/examples/search.go
@@ -8,7 +8,7 @@ import (
"fmt"
"log"
- "github.com/johnweldon/ldap"
+ "github.com/juju2013/goldap"
)
var (
diff --git a/examples/searchSSL.go b/examples/searchSSL.go
index 7a51b1d..a98ca3a 100644
--- a/examples/searchSSL.go
+++ b/examples/searchSSL.go
@@ -8,7 +8,7 @@ import (
"fmt"
"log"
- "github.com/johnweldon/ldap"
+ "github.com/juju2013/goldap"
)
var (
diff --git a/examples/searchTLS.go b/examples/searchTLS.go
index 026284c..a20bcc3 100644
--- a/examples/searchTLS.go
+++ b/examples/searchTLS.go
@@ -8,7 +8,7 @@ import (
"fmt"
"log"
- "github.com/johnweldon/ldap"
+ "github.com/juju2013/goldap"
)
var (
@@ -22,7 +22,7 @@ var (
func main() {
l, err := ldap.DialTLS("tcp", fmt.Sprintf("%s:%d", LdapServer, LdapPort), nil)
if err != nil {
- log.Fatalf("ERROR: %s\n", err.String())
+ log.Fatalf("ERROR: %s\n", err.Error())
}
defer l.Close()
// l.Debug = true
@@ -36,7 +36,7 @@ func main() {
sr, err := l.Search(search)
if err != nil {
- log.Fatalf("ERROR: %s\n", err.String())
+ log.Fatalf("ERROR: %s\n", err.Error())
return
}