Skip to content

Commit

Permalink
Merge pull request #76 from hookdeck/fix/empty-connection-name
Browse files Browse the repository at this point in the history
Fix/empty connection name
  • Loading branch information
leggetter authored May 8, 2024
2 parents a4fe17f + 88b51a3 commit e8f1bf5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/listen/listen.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,13 @@ func Listen(URL *url.URL, source_alias string, connectionQuery string, flags Fla

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

Expand Down

0 comments on commit e8f1bf5

Please sign in to comment.