From bd55b9a0f88db8e31645db8d468e134d804f7cd2 Mon Sep 17 00:00:00 2001 From: Phillip Rak Date: Tue, 16 Jul 2024 10:17:20 -0700 Subject: [PATCH] Resolve lint error `ineffectual assignment to path (ineffassign)` This resolves an error raised by the linter ``` Error: pkg/ui/routes.go:27:2: ineffectual assignment to path (ineffassign) path, err := filepath.Abs(r.URL.Path) ``` Signed-off-by: Phillip Rak --- pkg/ui/routes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/ui/routes.go b/pkg/ui/routes.go index aa9795a9..372b6d97 100644 --- a/pkg/ui/routes.go +++ b/pkg/ui/routes.go @@ -24,7 +24,7 @@ type spaHandler struct { // is suitable behavior for serving an SPA (single page application). func (h spaHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { // get the absolute path to prevent directory traversal - path, err := filepath.Abs(r.URL.Path) + _, err := filepath.Abs(r.URL.Path) if err != nil { // if we failed to get the absolute path respond with a 400 bad request // and stop