Skip to content

Commit ed5f765

Browse files
committed
- pretty format things
1 parent 250b785 commit ed5f765

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

vdxDevice/vdx.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func (b *vdxDevice) Connect() (err error) {
4343
prompt, err := b.Router.ReadTill(b.RTC, b.PromptReadTriggers)
4444

4545
if err := b.DetectSetPrompt(prompt); err != nil {
46-
return fmt.Errorf("Detect prompt: %s", err)
46+
return fmt.Errorf("detect prompt: %s", err)
4747
}
4848

4949
if _, err = b.skipPageDisplayMode(); err != nil {
@@ -64,7 +64,7 @@ func (b *vdxDevice) DetectSetPrompt(prompt string) error {
6464
func (b *vdxDevice) write(command string) error {
6565
_, err := b.SSHStdinPipe.Write([]byte(command))
6666
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)
6868
}
6969

7070
if b.RTC.Debug {
@@ -81,7 +81,7 @@ func (b *vdxDevice) ConfigureTerminalMode() error {
8181

8282
_, err := b.ReadTill(b.RTC, []string{"(config)#"})
8383
if err != nil {
84-
return fmt.Errorf("Cant find configure prompt: %s", err)
84+
return fmt.Errorf("can't find configure prompt: %s", err)
8585
}
8686

8787
if b.RTC.Debug {
@@ -92,22 +92,22 @@ func (b *vdxDevice) ConfigureTerminalMode() error {
9292

9393
func (b *vdxDevice) ExecPrivilegedMode(command string) error {
9494
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)
9696
}
9797

9898
if err := b.Write(b.RTC, command+"\n"); err != nil {
9999
return err
100100
}
101101
_, err := b.ReadTillEnabledPrompt(b.RTC)
102102
if err != nil {
103-
return fmt.Errorf("Cant find privileged mode: %s", err)
103+
return fmt.Errorf("can't find privileged mode: %s", err)
104104
}
105105
return nil
106106
}
107107

108108
func (b *vdxDevice) skipPageDisplayMode() (string, error) {
109109
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)
111111
}
112112

113113
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) {
163163

164164
func (b *vdxDevice) RunCommands(commands io.Reader) (err error) {
165165
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)
167167
}
168168

169169
return b.Router.RunCommands(b.RTC, commands)

0 commit comments

Comments
 (0)