From 3c4da551c9f35641051e0f1544a6c716092cc67d Mon Sep 17 00:00:00 2001 From: Chrystian Huot Date: Sun, 17 May 2026 08:56:49 -0400 Subject: [PATCH] fix: remove unnecessary error variable in command URL validation --- server/command.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server/command.go b/server/command.go index 5303c17..356ebbd 100644 --- a/server/command.go +++ b/server/command.go @@ -95,8 +95,6 @@ func NewCommand(baseDir string) *Command { } func (command *Command) Do(action string) { - var err error - i := 1 readVal := func() string { @@ -142,7 +140,7 @@ func (command *Command) Do(action string) { case COMMAND_ARG_URL: command.url = readVal() - if err != nil || !regexp.MustCompile(`^https?://`).Match([]byte(command.url)) { + if !regexp.MustCompile(`^https?://`).Match([]byte(command.url)) { command.exitWithError(errors.New("invalid URL")) } }