Standard Library

GoIoIoutil

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

Other Methods

.NopCloser()Neutral
#
Signature
NopCloser(r io.Reader) io.ReadCloser

NopCloser returns a ReadCloser with a no-op Close method wrapping

.ReadAll()Neutral
#
Signature
ReadAll(r io.Reader) ([]byte, error)

ReadAll reads from r until an error or EOF and returns the data it read.

.ReadDir()Neutral
#
Signature
ReadDir(dirname string) ([]fs.FileInfo, error)

ReadDir reads the directory named by dirname and returns

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

ReadFile reads the file named by filename and returns the contents.

.TempDir()Neutral
#
Signature
TempDir(dir string, pattern string) (string, error)

TempDir creates a new temporary directory in the directory dir.

.TempFile()Neutral
#
Signature
TempFile(dir string, pattern string) (*os.File, error)

TempFile creates a new temporary file in the directory dir,

.WriteFile()Neutral
#
Signature
WriteFile(filename string, data []byte, perm fs.FileMode) error

WriteFile writes data to a file named by filename.

Fully-Qualified Names

FQNField
io/ioutilfqns[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 ...  # io/ioutil