Help us shape the future of Go! Take the 2026 Go Developer Survey

pkg

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir added in v1.1.0

func Dir(p *packages.Package) string

Dir returns absolute path of the package in a filesystem

func Load added in v1.1.0

func Load(path string) (*packages.Package, error)

Load loads package by its import path

Types

type Package

type Package struct {
	Name  string
	Files map[string]*ast.File
}

func AST added in v1.1.0

func AST(fs *token.FileSet, p *packages.Package) (*Package, error)

AST returns package's abstract syntax tree

Jump to

Keyboard shortcuts

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