File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -18,14 +18,14 @@ func Example() {
18
18
var conn * ssh.Client
19
19
20
20
// open an SFTP session over an existing ssh connection.
21
- sftp , err := sftp .NewClient (conn )
21
+ client , err := sftp .NewClient (conn )
22
22
if err != nil {
23
23
log .Fatal (err )
24
24
}
25
25
defer sftp .Close ()
26
26
27
27
// walk a directory
28
- w := sftp .Walk ("/home/user" )
28
+ w := client .Walk ("/home/user" )
29
29
for w .Step () {
30
30
if w .Err () != nil {
31
31
continue
@@ -34,7 +34,7 @@ func Example() {
34
34
}
35
35
36
36
// leave your mark
37
- f , err := sftp .Create ("hello.txt" )
37
+ f , err := client .Create ("hello.txt" )
38
38
if err != nil {
39
39
log .Fatal (err )
40
40
}
@@ -43,7 +43,7 @@ func Example() {
43
43
}
44
44
45
45
// check it's there
46
- fi , err := sftp .Lstat ("hello.txt" )
46
+ fi , err := client .Lstat ("hello.txt" )
47
47
if err != nil {
48
48
log .Fatal (err )
49
49
}
You can’t perform that action at this time.
0 commit comments