style(web): split regexp to two lines for lint

This commit is contained in:
lc6464 2026-03-29 13:16:44 +08:00
parent 6f974195a8
commit 977a4b8efd
No known key found for this signature in database
GPG key ID: 53C61B42FEC71D6D

View file

@ -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) {