gopackage

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Build        build.Context
	GoVersion    string
	GOFLAGS      string
	GOEXPERIMENT string
	Architecture map[string]string
}

func CurrentContext

func CurrentContext() (Context, error)

func (Context) Digest

func (c Context) Digest() [32]byte

func (Context) Flags

func (c Context) Flags() ([]string, error)

type File

type File struct {
	Name   string
	Source []byte
	Syntax *ast.File
	Active bool
}

type Package

type Package struct {
	Name  string
	FSet  *token.FileSet
	Files []File
}

func Load

func Load(dir string, context Context) (*Package, error)

func Read

func Read(dir string, context Context) (*Package, error)

Jump to

Keyboard shortcuts

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