package gopackage
import "github.com/cloudboss/unobin/pkg/gopackage"
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)