]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modload: use lockedfile to read path-replacement go.mod files
authorRichard Miller <miller.research@gmail.com>
Wed, 29 Apr 2020 10:20:28 +0000 (11:20 +0100)
committerBryan C. Mills <bcmills@google.com>
Wed, 29 Apr 2020 18:56:19 +0000 (18:56 +0000)
commitb13ce66d1b3ce01064fd1912055d71447ab62384
tree5d0292c0c8dbd1bcfdefea35bae6c40d35bc5fa1
parent202c43b2ad3fca2cdcaff0d0720de5c99030b638
cmd/go/internal/modload: use lockedfile to read path-replacement go.mod files

When parsing go.mod files found via file-path replacements, it's safer to
use lockedfile.Read instead of ioutil.ReadFile, in case of overwriting by
other concurrent go commands.

Change-Id: I7dcac3bb5ada84bee1eb634b39f813c461ef103a
Reviewed-on: https://go-review.googlesource.com/c/go/+/230838
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/modload/mvs.go