Skip to content

Commit

Permalink
fix: Default to destination name when connection does not have a name
Browse files Browse the repository at this point in the history
  • Loading branch information
alexluong committed May 8, 2024
1 parent e434a72 commit dea1261
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/listen/listen.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ func Listen(URL *url.URL, source_alias string, connectionQuery string, flags Fla

fmt.Println(ansi.Bold("Connections"))
for _, connection := range connections {
connectionName := ""
var connectionName string
if connection.Name != nil {
connectionName = *connection.Name
} else {
connectionName = connection.Destination.Name
}
fmt.Println(connectionName + " forwarding to " + *connection.Destination.CliPath)
}
Expand Down

0 comments on commit dea1261

Please sign in to comment.