exportdata

package
v0.36.4 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package exportdata optionally carries dependencies' export data inside the binary.

A scan that cannot reach GOROOT or a module cache - a WASI guest with only the project mounted, a browser - still needs its dependencies' types, and reading them from precomputed export data costs a fraction of type-checking them from source. Carrying that data in the binary enables such a build self-contained.

It is opt-in, because it is several megabytes that most builds have no use for:

go run ./hack/genexportdata -out internal/exportdata/exportdata.zip std github.com/go-openapi/...
go build -tags exportdata ./cmd/genspec-wasi

Without the tag, Embedded reports that nothing is embedded and the caller falls back to whatever the environment offers. The archive is valid only for the toolchain that generated it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Embedded

func Embedded() (fs.FS, bool)

Embedded reports that this build carries no export data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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