Alan Shreve 12 years ago
parent
commit
8cf612ae74
2 changed files with 18 additions and 18 deletions
  1. 17 17
      src/ngrok/client/cli.go
  2. 1 1
      src/ngrok/client/ui/interface.go

+ 17 - 17
src/ngrok/client/cli.go

@@ -4,9 +4,9 @@ import (
 	"errors"
 	"flag"
 	"fmt"
+	"net"
 	"os"
 	"strconv"
-        "net"
 )
 
 var (
@@ -22,7 +22,7 @@ type Options struct {
 	url         string
 	subdomain   string
 	historySize int
-        webport int
+	webport     int
 }
 
 func fail(msg string, args ...interface{}) {
@@ -65,10 +65,10 @@ func parseLocalAddr() string {
 	}
 
 	// try to parse as a connection string
-        _, port, err := net.SplitHostPort(addr)
-        if err != nil {
-                fail("%v", err)
-        }
+	_, port, err := net.SplitHostPort(addr)
+	if err != nil {
+		fail("%v", err)
+	}
 
 	if parsePort(port) != nil {
 		fail("'%s' is not a valid port number (1-65535)", port)
@@ -115,20 +115,20 @@ func parseArgs() *Options {
 		"http",
 		"The protocol of the traffic over the tunnel {'http', 'tcp'} (default: 'http')")
 
-        webport := flag.Int(
-                "webport",
-                4040,
-                "The port on which the web interface is served")
+	webport := flag.Int(
+		"webport",
+		4040,
+		"The port on which the web interface is served")
 
 	flag.Parse()
 
 	return &Options{
-		server:      *server,
-		auth:        *auth,
-		hostname:    *hostname,
-		subdomain:   *subdomain,
-		localaddr:   parseLocalAddr(),
-		protocol:    parseProtocol(*protocol),
-		webport:     *webport,
+		server:    *server,
+		auth:      *auth,
+		hostname:  *hostname,
+		subdomain: *subdomain,
+		localaddr: parseLocalAddr(),
+		protocol:  parseProtocol(*protocol),
+		webport:   *webport,
 	}
 }

+ 1 - 1
src/ngrok/client/ui/interface.go

@@ -11,7 +11,7 @@ type State interface {
 	GetLocalAddr() string
 	GetStatus() string
 	GetProtocol() proto.Protocol
-        GetWebPort() int
+	GetWebPort() int
 	IsStopping() bool
 	GetConnectionMetrics() (metrics.Meter, metrics.Timer)
 	GetBytesInMetrics() (metrics.Counter, metrics.Histogram)