@@ -43,7 +43,7 @@ func (b *vdxDevice) Connect() (err error) {
43
43
prompt , err := b .Router .ReadTill (b .RTC , b .PromptReadTriggers )
44
44
45
45
if err := b .DetectSetPrompt (prompt ); err != nil {
46
- return fmt .Errorf ("Detect prompt: %s" , err )
46
+ return fmt .Errorf ("detect prompt: %s" , err )
47
47
}
48
48
49
49
if _ , err = b .skipPageDisplayMode (); err != nil {
@@ -64,7 +64,7 @@ func (b *vdxDevice) DetectSetPrompt(prompt string) error {
64
64
func (b * vdxDevice ) write (command string ) error {
65
65
_ , err := b .SSHStdinPipe .Write ([]byte (command ))
66
66
if err != nil {
67
- return fmt .Errorf ("Cant write to the ssh connection %s" , err )
67
+ return fmt .Errorf ("can't write to the ssh connection %s" , err )
68
68
}
69
69
70
70
if b .RTC .Debug {
@@ -81,7 +81,7 @@ func (b *vdxDevice) ConfigureTerminalMode() error {
81
81
82
82
_ , err := b .ReadTill (b .RTC , []string {"(config)#" })
83
83
if err != nil {
84
- return fmt .Errorf ("Cant find configure prompt: %s" , err )
84
+ return fmt .Errorf ("can't find configure prompt: %s" , err )
85
85
}
86
86
87
87
if b .RTC .Debug {
@@ -92,22 +92,22 @@ func (b *vdxDevice) ConfigureTerminalMode() error {
92
92
93
93
func (b * vdxDevice ) ExecPrivilegedMode (command string ) error {
94
94
if err := b .SwitchMode ("sshEnabled" ); err != nil {
95
- return fmt .Errorf ("Cant switch to privileged mode: %s" , err )
95
+ return fmt .Errorf ("can't switch to privileged mode: %s" , err )
96
96
}
97
97
98
98
if err := b .Write (b .RTC , command + "\n " ); err != nil {
99
99
return err
100
100
}
101
101
_ , err := b .ReadTillEnabledPrompt (b .RTC )
102
102
if err != nil {
103
- return fmt .Errorf ("Cant find privileged mode: %s" , err )
103
+ return fmt .Errorf ("can't find privileged mode: %s" , err )
104
104
}
105
105
return nil
106
106
}
107
107
108
108
func (b * vdxDevice ) skipPageDisplayMode () (string , error ) {
109
109
if err := b .SwitchMode ("sshEnabled" ); err != nil {
110
- return "" , fmt .Errorf ("Cant switch to enabled mode to execute terminal-length: %s" , err )
110
+ return "" , fmt .Errorf ("can't switch to enabled mode to execute terminal-length: %s" , err )
111
111
}
112
112
113
113
if err := b .Write (b .RTC , "terminal length 0\r \n " ); err != nil {
@@ -163,7 +163,7 @@ func (b *vdxDevice) PasteConfiguration(configuration io.Reader) (err error) {
163
163
164
164
func (b * vdxDevice ) RunCommands (commands io.Reader ) (err error ) {
165
165
if err = b .SwitchMode ("sshEnabled" ); err != nil {
166
- return fmt .Errorf ("Cant switch to privileged mode: %s" , err )
166
+ return fmt .Errorf ("can't switch to privileged mode: %s" , err )
167
167
}
168
168
169
169
return b .Router .RunCommands (b .RTC , commands )
0 commit comments