gobuild

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 12 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

Overview

Package gobuild validates source-backed registrations using the application's Go build context. It compiles packages, never runs their initialization code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Dir  string
	Tags string
	Env  []string
	// contains filtered or unexported fields
}

Context preserves the module/workspace, replacements and build selection. Env supplements the inherited environment. Empty Tags retains GOFLAGS; nonempty Tags explicitly selects the build tags for both validation stages.

func (*Context) Clone

func (c *Context) Clone() *Context

func (*Context) Importer

func (c *Context) Importer(packages ...string) (types.Importer, error)

Importer reads Go's build-selected export data. A single importer preserves identity across contracts, aliases and the actual xdatly generic interface.

func (*Context) Validate

func (c *Context) Validate(pkg string, files map[string][]byte) error

Validate overlays staged files at their final locations, so internal-package access and import cycles are checked in the real destination package context. A nil content removes a file. No application files or module files are written.

func (*Context) ValidateFiles

func (c *Context) ValidateFiles(pkg string, files map[string][]byte) ([]string, error)

ValidateFiles also returns the build-selected source filenames so metadata loading cannot accidentally reintroduce excluded files after publication.

func (*Context) WithContext

func (c *Context) WithContext(ctx context.Context) *Context

Jump to

Keyboard shortcuts

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