Use TrimRight instead

This commit is contained in:
Andrew Morgan 2018-07-16 15:56:09 +01:00
parent 5fdcc5e77e
commit 1e16961fd6

View file

@ -189,9 +189,7 @@ func checkErrors(config *Dendrite) (err error) {
} }
// Check if the url has trailing /'s. If so, remove them // Check if the url has trailing /'s. If so, remove them
for strings.HasSuffix(appservice.URL, "/") { appservice.URL = strings.TrimRight(appservice.URL, "/")
appservice.URL = strings.TrimSuffix(appservice.URL, "/")
}
// Check if we've already seen this ID. No two application services // Check if we've already seen this ID. No two application services
// can have the same ID or token. // can have the same ID or token.