Skip to content

Commit a73d4bd

Browse files
committed
feat: print list of port forwards
1 parent 5e49f32 commit a73d4bd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

cmd/wokwigw/wokwigw.go

+12
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,20 @@ Listening on TCP Port %d
126126
`, version, gitStr, flags.listenPort)
127127
}
128128

129+
func printForwards(config *types.Configuration) {
130+
// Print forwards
131+
if len(config.Forwards) > 0 {
132+
fmt.Println("\nPort forwards (local -> simulator):")
133+
for local, remote := range config.Forwards {
134+
fmt.Printf(" %s -> %s\n", local, remote)
135+
}
136+
fmt.Println()
137+
}
138+
}
139+
129140
func run(cmd *cobra.Command, _ []string) error {
130141
banner()
142+
printForwards(&config)
131143

132144
logrus.SetLevel(logrus.WarnLevel)
133145

0 commit comments

Comments
 (0)