From cb76fd423eeefb69fa9ed785f7eb4843519e3a0c Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Thu, 2 Jul 2020 14:10:15 +0100 Subject: [PATCH] Linting --- clientapi/routing/directory_public.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/clientapi/routing/directory_public.go b/clientapi/routing/directory_public.go index e52bc4de2..6d0db579b 100644 --- a/clientapi/routing/directory_public.go +++ b/clientapi/routing/directory_public.go @@ -269,9 +269,7 @@ func fillPublicRoomsReq(httpReq *http.Request, request *PublicRoomReq) *util.JSO // strip the 'T' which is only required because when sytest does pagination tests it stops // iterating when !prev_batch which then fails if prev_batch==0, so add arbitrary text to // make it truthy not falsey. - if strings.HasPrefix(request.Since, "T") { - request.Since = request.Since[1:] - } + request.Since = strings.TrimPrefix(request.Since, "T") return nil }