From 716a8d133f722e85743fff5b2ecff013ea4fdcab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Carvalho?= Date: Mon, 22 Aug 2016 09:32:33 -0300 Subject: [PATCH] driverutil: uses SplitN to parse user input MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Carvalho --- drivers/driverutil/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/driverutil/util.go b/drivers/driverutil/util.go index cf36fc5a46..a4b236b223 100644 --- a/drivers/driverutil/util.go +++ b/drivers/driverutil/util.go @@ -5,7 +5,7 @@ import "strings" // SplitPortProto splits a string in the format port/protocol, defaulting // protocol to "tcp" if not provided. func SplitPortProto(raw string) (port string, protocol string, err error) { - parts := strings.Split(raw, "/") + parts := strings.SplitN(raw, "/", 2) if len(parts) == 1 { protocol = "tcp" } else {