From 1e16961fd6740f4f2bb9044e9e98f1211ec84b2c Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Mon, 16 Jul 2018 15:56:09 +0100 Subject: [PATCH] Use TrimRight instead --- .../matrix-org/dendrite/common/config/appservice.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/github.com/matrix-org/dendrite/common/config/appservice.go b/src/github.com/matrix-org/dendrite/common/config/appservice.go index e9e0158d5..10bc2deb3 100644 --- a/src/github.com/matrix-org/dendrite/common/config/appservice.go +++ b/src/github.com/matrix-org/dendrite/common/config/appservice.go @@ -189,9 +189,7 @@ func checkErrors(config *Dendrite) (err error) { } // Check if the url has trailing /'s. If so, remove them - for strings.HasSuffix(appservice.URL, "/") { - appservice.URL = strings.TrimSuffix(appservice.URL, "/") - } + appservice.URL = strings.TrimRight(appservice.URL, "/") // Check if we've already seen this ID. No two application services // can have the same ID or token.