Skip to content

Commit ec0792d

Browse files
committed
Merge pull request #114 from moul/fix-godoc
Fixed test functions for GoDoc
2 parents 1bbc208 + afd4fae commit ec0792d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pkg/sshcommand/sshcommand_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,16 @@ func ExampleCommand_gateway() *Command {
4242
}
4343
}
4444

45-
func ExampleCommandNew() *Command {
45+
func ExampleCommand_New() *Command {
4646
return New("1.2.3.4")
4747
}
4848

49-
func ExampleCommandString() {
49+
func ExampleCommand_String() {
5050
fmt.Println(New("1.2.3.4").String())
5151
// Output: ssh 1.2.3.4
5252
}
5353

54-
func ExampleCommandString_options() {
54+
func ExampleCommand_String_options() {
5555
command := Command{
5656
SkipHostKeyChecking: true,
5757
Host: "1.2.3.4",
@@ -66,7 +66,7 @@ func ExampleCommandString_options() {
6666
// ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 1.2.3.4 -t -t -- /bin/sh -e -x -c "\"\\\"echo\\\" \\\"hello world\\\"\""
6767
}
6868

69-
func ExampleCommandString_complex() {
69+
func ExampleCommand_String_complex() {
7070
command := Command{
7171
SkipHostKeyChecking: true,
7272
Host: "1.2.3.4",
@@ -87,17 +87,17 @@ func ExampleCommandString_complex() {
8787
// ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o "ProxyCommand=ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -W %h:%p -l toor 5.6.7.8 -t -t" 1.2.3.4 -t -t -- /bin/sh -e -c "\"\\\"echo\\\" \\\"hello world\\\"\""
8888
}
8989

90-
func ExampleCommandSlice() {
90+
func ExampleCommand_Slice() {
9191
fmt.Println(New("1.2.3.4").Slice())
9292
// Output: [ssh 1.2.3.4]
9393
}
9494

95-
func ExampleCommandSlice_user() {
95+
func ExampleCommand_Slice_user() {
9696
fmt.Println(New("root@1.2.3.4").Slice())
9797
// Output: [ssh -l root 1.2.3.4]
9898
}
9999

100-
func ExampleCommandSlice_options() {
100+
func ExampleCommand_Slice_options() {
101101
command := Command{
102102
SkipHostKeyChecking: true,
103103
Host: "1.2.3.4",
@@ -113,7 +113,7 @@ func ExampleCommandSlice_options() {
113113
// ["ssh" "-q" "-o" "UserKnownHostsFile=/dev/null" "-o" "StrictHostKeyChecking=no" "-l" "root" "1.2.3.4" "-t" "-t" "--" "/bin/sh" "-e" "-x" "-c" "\"\\\"echo\\\" \\\"hello world\\\"\""]
114114
}
115115

116-
func ExampleCommandSlice_gateway() {
116+
func ExampleCommand_Slice_gateway() {
117117
command := Command{
118118
Host: "1.2.3.4",
119119
Gateway: New("5.6.7.8"),
@@ -124,7 +124,7 @@ func ExampleCommandSlice_gateway() {
124124
// ["ssh" "-o" "ProxyCommand=ssh -W %h:%p 5.6.7.8" "1.2.3.4"]
125125
}
126126

127-
func ExampleCommandSlice_complex() {
127+
func ExampleCommand_Slice_complex() {
128128
command := Command{
129129
SkipHostKeyChecking: true,
130130
Host: "1.2.3.4",

0 commit comments

Comments
 (0)