Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Weaver ¶
type Weaver struct {
ImportPath string
}
func (Weaver) OnCompileMain ¶
func (Weaver) OnCompileMain(cmd *proxy.CompileCommand) error
OnCompileMain only performs changes when compiling the "main" package, adding blank imports for any linkdeps dependencies that are not yet satisfied by the importcfg file (this is the case for link-time dependencies implied by use of the go:linkname directive, which are used to avoid creating circular import dependencies). This ensures that the relevant packages' `init` (if any) are appropriately run, and that the linker automatically picks up these dependencies when creating the full binary.
Click to show internal directories.
Click to hide internal directories.