analysisinternal

package
v2.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2025 License: GPL-3.0, BSD-3-Clause Imports: 3 Imported by: 0

README

analysisinternal

Extracted from /internal/analysisinternal/ (related to checker). This is just a copy of the code without any changes.

History

Documentation

Overview

Package analysisinternal provides gopls' internal analyses with a number of helper functions that operate on typed syntax trees.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckReadable

func CheckReadable(pass *analysis.Pass, filename string) error

CheckReadable enforces the access policy defined by the ReadFile field of analysis.Pass.

Types

type ReadFileFunc added in v2.5.0

type ReadFileFunc = func(filename string) ([]byte, error)

A ReadFileFunc is a function that returns the contents of a file, such as os.ReadFile.

func CheckedReadFile added in v2.5.0

func CheckedReadFile(pass *analysis.Pass, readFile ReadFileFunc) ReadFileFunc

CheckedReadFile returns a wrapper around a Pass.ReadFile function that performs the appropriate checks.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL