Skip to content

Commit 54c2491

Browse files
authored
Merge pull request pkg#352 from eleijonmarck/patch-1
Update example_test.go
2 parents 18dc4db + 0142f24 commit 54c2491

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

example_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ func Example() {
1818
var conn *ssh.Client
1919

2020
// open an SFTP session over an existing ssh connection.
21-
sftp, err := sftp.NewClient(conn)
21+
client, err := sftp.NewClient(conn)
2222
if err != nil {
2323
log.Fatal(err)
2424
}
2525
defer sftp.Close()
2626

2727
// walk a directory
28-
w := sftp.Walk("/home/user")
28+
w := client.Walk("/home/user")
2929
for w.Step() {
3030
if w.Err() != nil {
3131
continue
@@ -34,7 +34,7 @@ func Example() {
3434
}
3535

3636
// leave your mark
37-
f, err := sftp.Create("hello.txt")
37+
f, err := client.Create("hello.txt")
3838
if err != nil {
3939
log.Fatal(err)
4040
}
@@ -43,7 +43,7 @@ func Example() {
4343
}
4444

4545
// check it's there
46-
fi, err := sftp.Lstat("hello.txt")
46+
fi, err := client.Lstat("hello.txt")
4747
if err != nil {
4848
log.Fatal(err)
4949
}

0 commit comments

Comments
 (0)