Skip to content

Commit

Permalink
frrouting: Fix compatibility with Go 1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
ppmathis committed Jun 15, 2019
1 parent f415ace commit fcdf766
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mod-frrouting/frr.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func (s *vtyshSession) execute(commandFmt string, args ...interface{}) (_ string

func (s *vtyshSession) executeJSON(commandFmt string, args ...interface{}) (_ string, err error) {
rawOutput, err := s.execute(commandFmt, args...)
sanitizedOutput := strings.ReplaceAll(strings.TrimSpace(rawOutput), "\n", " ")
sanitizedOutput := strings.Replace(strings.TrimSpace(rawOutput), "\n", " ", -1)
if err != nil {
return "", fmt.Errorf("command execution failed: %s (%s)", err.Error(), sanitizedOutput)
}
Expand Down

0 comments on commit fcdf766

Please sign in to comment.