play

package module
v0.0.0-...-dbef652 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: MIT Imports: 16 Imported by: 0

README

play

pkg.go.dev

play is a library to run analysis.Analyzer on The Go Playground.

This library is experimental.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Context

func Context(fsys fs.FS) *build.Context

func ImportFromExportData

func ImportFromExportData(config *Config, path string) (*types.Package, error)

func ImportFromVendor

func ImportFromVendor(parent types.Importer, config *Config, p string) (*types.Package, error)

func Importer

func Importer(config *Config) types.Importer

func ParseDir

func ParseDir(config *Config, dir string, mode parser.Mode) (map[string][]*ast.File, error)

func ParseFile

func ParseFile(config *Config, filename string, mode parser.Mode) (*ast.File, error)

Types

type Config

type Config struct {
	Fset    *token.FileSet
	Fsys    fs.FS
	Context *build.Context
}

func (*Config) HasVendor

func (config *Config) HasVendor() bool

type Result

type Result struct {
	Pass        *analysis.Pass
	Diagnostics []analysis.Diagnostic
	Facts       map[types.Object][]analysis.Fact
	Result      any
	Err         error
}

func Run

func Run(testdata fs.FS, a *analysis.Analyzer, pkgs ...string) ([]*Result, error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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