From 977a4b8efd37c6ebb93c8c5349ad0b7c823662c9 Mon Sep 17 00:00:00 2001 From: lc6464 <64722907+lc6464@users.noreply.github.com> Date: Sun, 29 Mar 2026 13:16:44 +0800 Subject: [PATCH] style(web): split regexp to two lines for lint --- web/backend/api/version.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/backend/api/version.go b/web/backend/api/version.go index a8b912c34..6232b989b 100644 --- a/web/backend/api/version.go +++ b/web/backend/api/version.go @@ -51,8 +51,11 @@ var ( currentGatewayVersionState = gatewayVersionState launcherBuildInfoForVersion = fallbackSystemVersionInfoFromConfig versionInfoCache = newSystemVersionCache() - versionLinePattern = regexp.MustCompile(`^(?:[^A-Za-z0-9]*\s*)?picoclaw(?:\.exe)?\s+([^\s(]+)(?:\s+\(git:\s*([^)]+)\))?\s*$`) ansiEscapePattern = regexp.MustCompile(`\x1b\[[0-9;]*m`) + versionLinePattern = regexp.MustCompile( + `^(?:[^A-Za-z0-9]*\s*)?picoclaw(?:\.exe)?\s+([^\s(]+)` + + `(?:\s+\(git:\s*([^)]+)\))?\s*$`, + ) ) func (h *Handler) registerVersionRoutes(mux *http.ServeMux) {