зеркало из https://github.com/golang/build.git
cmd/racebuild: use multi-line match for README regexp
In https://golang.org/cl/115375 I had neglected to test against a non-empty README file, and accidentally wrote a regexp that never matches. Change-Id: I676cb11abea7e0f5bf337aab640ebc2478295a9b Reviewed-on: https://go-review.googlesource.com/115377 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Родитель
11ce5df82e
Коммит
01f5214fec
|
@ -392,7 +392,7 @@ func (p *Platform) UpdateReadme() error {
|
|||
// record it in the README.
|
||||
updatedLine := fmt.Sprintf(readmeTmpl, syso, *flagRev, goRev)
|
||||
|
||||
lineRE, err := regexp.Compile("^" + fmt.Sprintf(readmeTmpl, regexp.QuoteMeta(syso), commitRE, commitRE) + "$")
|
||||
lineRE, err := regexp.Compile("(?m)^" + fmt.Sprintf(readmeTmpl, regexp.QuoteMeta(syso), commitRE, commitRE) + "$")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче