mirror of
https://github.com/golang/go
synced 2024-11-23 17:30:02 -07:00
testing/fstest: add godoc links
Change-Id: I611f04f12bb93197fea5ae40a08e5f60426f1c00 Reviewed-on: https://go-review.googlesource.com/c/go/+/534076 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: qiulaidongfeng <2645477756@qq.com> Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
09aada24aa
commit
53d000d75b
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user