Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5e87bc6

Browse files
committed
format
1 parent 2471dd5 commit 5e87bc6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cli/remoteforward.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ type cookieAddr struct {
2121
cookie []byte
2222
}
2323

24+
// Format:
25+
// remote_port:local_address:local_port
2426
var remoteForwardRegex = regexp.MustCompile(`^(\d+):(.+):(\d+)$`)
2527

2628
func validateRemoteForward(flag string) bool {
@@ -30,8 +32,6 @@ func validateRemoteForward(flag string) bool {
3032
func parseRemoteForward(flag string) (net.Addr, net.Addr, error) {
3133
matches := remoteForwardRegex.FindStringSubmatch(flag)
3234

33-
// Format:
34-
// remote_port:local_address:local_port
3535
remotePort, err := strconv.Atoi(matches[1])
3636
if err != nil {
3737
return nil, nil, xerrors.Errorf("remote port is invalid: %w", err)

0 commit comments

Comments
 (0)