Browse Source

Refactoring to remove cleverness.

Nick Presta 12 years ago
parent
commit
54b2056c12
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/ngrok/client/views/term/http.go

+ 1 - 2
src/ngrok/client/views/term/http.go

@@ -6,7 +6,6 @@ import (
 	"ngrok/log"
 	"ngrok/proto"
 	"ngrok/util"
-	"strings"
 	"unicode/utf8"
 )
 
@@ -74,7 +73,7 @@ func (v *HttpView) Render() {
 		txn := obj.(*proto.HttpTxn)
 		path := txn.Req.URL.Path
 		if utf8.RuneCountInString(path) > pathMaxLength {
-			path = strings.Join(strings.SplitAfterN(path, "", pathMaxLength+1)[:pathMaxLength], "")
+			path = string([]rune(path)[:pathMaxLength])
 		}
 		v.Printf(0, 3+i, "%s %v", txn.Req.Method, path)
 		if txn.Resp != nil {