From 32a397a349abdfc361747d41c3fec0feed9a0ffd Mon Sep 17 00:00:00 2001 From: Liam Stanley Date: Fri, 9 Jun 2017 18:54:17 -0400 Subject: [PATCH] utilize goto to cleanup a bit --- cap.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/cap.go b/cap.go index 294872e..b61080a 100644 --- a/cap.go +++ b/cap.go @@ -111,19 +111,12 @@ func handleCAP(c *Client, e Event) { if caps[k][i] == possible[k][j] { // Assume we have a matching split value. contains = true - break + goto checkcontains } - - if contains { - break - } - } - - if contains { - break } } + checkcontains: if !contains { continue }