Skip to content

Commit e80f029

Browse files
authored
chore: update DirSync and DirSyncAsync examples
update `DirSync` and `DirSyncAsync` example codes to use `DialURL` instead of the already deprecated `Dial` function
1 parent 9cfc03b commit e80f029

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

v3/examples_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ func ExampleControlPaging_manualPaging() {
415415
// This example demonstrates how to use DirSync to manually execute a
416416
// DirSync search request
417417
func ExampleConn_DirSync() {
418-
conn, err := Dial("tcp", "ad.example.org:389")
418+
conn, err := DialURL("ldap://ad.example.org:389")
419419
if err != nil {
420420
log.Fatalf("Failed to connect: %s\n", err)
421421
}
@@ -468,7 +468,7 @@ func ExampleConn_DirSync() {
468468

469469
// This example demonstrates how to use DirSync search asynchronously
470470
func ExampleConn_DirSyncAsync() {
471-
conn, err := Dial("tcp", "ad.example.org:389")
471+
conn, err := DialURL("ldap://ad.example.org:389")
472472
if err != nil {
473473
log.Fatalf("Failed to connect: %s\n", err)
474474
}

0 commit comments

Comments
 (0)