From 039fb0ce71d132a1dfe93b516bc5953dcb61285e Mon Sep 17 00:00:00 2001 From: horus_arch Date: Fri, 20 Mar 2015 01:01:30 +0100 Subject: Bundling functionality in server.go and improving code flow. --- utilities.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'utilities.go') diff --git a/utilities.go b/utilities.go index a090ea7..60423dc 100644 --- a/utilities.go +++ b/utilities.go @@ -14,3 +14,15 @@ func Md5Hash(content string) string { return hash } + +// Checks for equality in strings and returns true all are equal +func CompareStrings(strs ...string) bool { + for k, _ := range strs { + if k < len(strs)-1 { + if strs[k] != strs[k+1] { + return false + } + } + } + return true +} -- cgit v1.2.3