зеркало из https://github.com/golang/build.git
relnote: check error from io.ReadAll
Change-Id: Ibf075a5f643eab6ba29ff8798f6e2bd8eb30ec4d Reviewed-on: https://go-review.googlesource.com/c/build/+/644155 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Auto-Submit: Ian Lance Taylor <iant@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org>
This commit is contained in:
Родитель
6a93df3ff9
Коммит
81e4bd7e2a
|
@ -462,5 +462,8 @@ func checkFragmentFile(fsys fs.FS, filename string) error {
|
|||
}
|
||||
defer f.Close()
|
||||
data, err := io.ReadAll(f)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return CheckFragment(string(data))
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче