sdk/golang/Standard Library/GoTestingFstest
Standard Library

GoTestingFstest

Go stdlib package — testing/fstest. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.MapFS.Glob()Neutral
#
Signature
MapFS.Glob(pattern string) ([]string, error)

MapFS.Glob function.

.MapFS.Open()Neutral
#
Signature
MapFS.Open(name string) (fs.File, error)

Open opens the named file.

.MapFS.ReadDir()Neutral
#
Signature
MapFS.ReadDir(name string) ([]fs.DirEntry, error)

MapFS.ReadDir function.

.MapFS.ReadFile()Neutral
#
Signature
MapFS.ReadFile(name string) ([]byte, error)

MapFS.ReadFile function.

.MapFS.Stat()Neutral
#
Signature
MapFS.Stat(name string) (fs.FileInfo, error)

MapFS.Stat function.

.MapFS.Sub()Neutral
#
Signature
MapFS.Sub(dir string) (fs.FS, error)

MapFS.Sub function.

.TestFS()Neutral
#
Signature
TestFS(fsys fs.FS, expected string) error

TestFS tests a file system implementation.

.MapFS()Neutral
#
Signature
type MapFS ...

A MapFS is a simple in-memory file system for use in tests,

.MapFile()Neutral
#
Signature
type MapFile ...

A MapFile describes a single file in a MapFS.

Fully-Qualified Names

FQNField
testing/fstestfqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

go.mod
// standard library — no go.mod entry required
rule.py
from codepathfinder.go_rule import ...  # testing/fstest