From 47cd07203737de9431e5850bdbf6aae34ff82912 Mon Sep 17 00:00:00 2001 From: Zvonimir Pavlinovic Date: Tue, 5 Nov 2024 19:53:34 +0000 Subject: [PATCH] cmd/govulncheck/testdata: expand set of go versions in fixup An example is a multi-word release candidate. Change-Id: Id5ef9ebd1ba94dad692d5ae8a74f03cb513f24a9 Reviewed-on: https://go-review.googlesource.com/c/vuln/+/625576 Reviewed-by: Maceo Thompson LUCI-TryBot-Result: Go LUCI --- cmd/govulncheck/testdata/common/config.json | 4 ++-- cmd/govulncheck/testdata/stdlib/config.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/govulncheck/testdata/common/config.json b/cmd/govulncheck/testdata/common/config.json index 642526c4..1a0fae44 100644 --- a/cmd/govulncheck/testdata/common/config.json +++ b/cmd/govulncheck/testdata/common/config.json @@ -33,7 +33,7 @@ "replace": "Go: go1.18" }, { - "pattern": "\"go_version\": \"go[^\\s\"]*\"", + "pattern": "\"go_version\": \"go(.*)\"", "replace": "\"go_version\": \"go1.18\"" }, { @@ -41,7 +41,7 @@ "replace": "\"timestamp\": \"2024-01-01T00:00:00\"," }, { - "pattern": "path\": \"stdlib\",\n *\"version\": \"[^\\s]*\"", + "pattern": "path\": \"stdlib\",\n *\"version\": \"(.*)\"", "replace": "path\": \"stdlib\",\n \"version\": \"v1.18.0\"" } ] diff --git a/cmd/govulncheck/testdata/stdlib/config.json b/cmd/govulncheck/testdata/stdlib/config.json index 630175ab..bed4dcd2 100644 --- a/cmd/govulncheck/testdata/stdlib/config.json +++ b/cmd/govulncheck/testdata/stdlib/config.json @@ -41,7 +41,7 @@ "replace": "modified 01 Jan 21 00:00 UTC)" }, { - "pattern": "\"go_version\": \"go[^\\s\"]*\"", + "pattern": "\"go_version\": \"go(.*)\"", "replace": "\"go_version\": \"go1.18\"" } ]