From 79401cb4838ed397eeb5f4cfcaac2040988c02e2 Mon Sep 17 00:00:00 2001 From: youzeliang Date: Wed, 23 Jun 2021 06:44:39 +0800 Subject: [PATCH] Update tree.go (#2659) delete more "()" (cherry picked from commit 61a0cda75a997e61d99ebf9dfbbac28aadf1350b) --- tree.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tree.go b/tree.go index 5eb093489e..d18ef5dd48 100644 --- a/tree.go +++ b/tree.go @@ -500,7 +500,7 @@ walk: // Outer loop for walking the tree } // ... but we can't - value.tsr = (len(path) == end+1) + value.tsr = len(path) == end+1 return } @@ -512,7 +512,7 @@ walk: // Outer loop for walking the tree // No handle found. Check if a handle for this path + a // trailing slash exists for TSR recommendation n = n.children[0] - value.tsr = (n.path == "/" && n.handlers != nil) + value.tsr = n.path == "/" && n.handlers != nil } return