Documentation
¶
Overview ¶
Package packaging audits runtime dependencies and local resource closure
Index ¶
- func Cached(path, key string) bool
- func CurrentModulePath(ctx context.Context, root string, environment []string) (string, error)
- func Fingerprint(inputs map[string][]byte, configuration any) (string, error)
- func Parallel[T any](ctx context.Context, items []T, jobs int, fn func(T) error) error
- func ReadNotices(modules []Module) ([]byte, error)
- func Remember(path, key string) error
- func VCSConfiguration(ctx context.Context, root string, environment []string) (any, error)
- func ValidateLayoutReferences(value any, files map[string][]byte) error
- type BinaryBuildConfiguration
- type Module
- type Resource
- type SDKBuildInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentModulePath ¶
Ask the selected Go toolchain which main module owns this go.mod. A workspace can contain several main modules; an arbitrary first result may be a sibling
func Fingerprint ¶
Fingerprint includes explicit configuration and sorted, length-delimited inputs
func ReadNotices ¶
ReadNotices requires a license for every runtime dependency and retains NOTICE
func VCSConfiguration ¶
Go stamps repository-wide revision/dirty state and derives the main module's version from local tags and history. These inputs can change without a plugin source changing. Keep them in every binary key, including worktree checkouts
Types ¶
type BinaryBuildConfiguration ¶
type BinaryBuildConfiguration struct {
Go json.RawMessage
ModulePath string
VCS any
SDK SDKBuildInput
}
func BinaryConfiguration ¶
func BinaryConfiguration(ctx context.Context, root string, environment []string) (BinaryBuildConfiguration, error)
Read effective values from the same Go command and environment used for the build. os.Getenv alone misses settings saved with go env -w, and the running packager's runtime.Version may differ from the selected compiler's version
type Resource ¶
type SDKBuildInput ¶
type SDKBuildInput struct{ ImportPath, Version, Sum, Content string }
func SDKConfiguration ¶
func SDKConfiguration(ctx context.Context, root string, environment []string) (SDKBuildInput, error)
Hash the effective package tree, including replace/go.work sources. A version alone is insufficient when SDK development changes files without a new tag