From: Olivier Mengué Date: Mon, 9 Oct 2023 21:56:48 +0000 (+0200) Subject: testing/fstest: add godoc links X-Git-Tag: go1.22rc1~625 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=53d000d75b32bed4b7ee18afe169cb93217cb257;p=gostls13.git testing/fstest: add godoc links Change-Id: I611f04f12bb93197fea5ae40a08e5f60426f1c00 Reviewed-on: https://go-review.googlesource.com/c/go/+/534076 Reviewed-by: Ian Lance Taylor Reviewed-by: Dmitri Shuralyov Reviewed-by: qiulaidongfeng <2645477756@qq.com> Auto-Submit: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI --- diff --git a/src/testing/fstest/mapfs.go b/src/testing/fstest/mapfs.go index b3fc0c8ad7..8912e98930 100644 --- a/src/testing/fstest/mapfs.go +++ b/src/testing/fstest/mapfs.go @@ -19,8 +19,8 @@ import ( // // The map need not include parent directories for files contained // in the map; those will be synthesized if needed. -// But a directory can still be included by setting the MapFile.Mode's ModeDir bit; -// this may be necessary for detailed control over the directory's FileInfo +// But a directory can still be included by setting the MapFile.Mode's [fs.ModeDir] bit; +// this may be necessary for detailed control over the directory's [fs.FileInfo] // or to create an empty directory. // // File system operations read directly from the map, @@ -32,12 +32,12 @@ import ( // than a few hundred entries or directory reads. type MapFS map[string]*MapFile -// A MapFile describes a single file in a MapFS. +// A MapFile describes a single file in a [MapFS]. type MapFile struct { Data []byte // file content - Mode fs.FileMode // FileInfo.Mode - ModTime time.Time // FileInfo.ModTime - Sys any // FileInfo.Sys + Mode fs.FileMode // fs.FileInfo.Mode + ModTime time.Time // fs.FileInfo.ModTime + Sys any // fs.FileInfo.Sys } var _ fs.FS = MapFS(nil)