ldflags

package
v0.0.0-...-24ce6ba Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveInjectedStrings

func ResolveInjectedStrings(pkg *types.Package, injected map[string]string) (map[*types.Var]string, error)

ResolveInjectedStrings maps fully-qualified -ldflags=-X injections to the corresponding package variable objects for the provided package. Entries that do not belong to the package are ignored.

func Sanitize

func Sanitize(flags []string) ([]string, map[string]string, error)

Sanitize extracts plaintext -X assignments and replaces them with empty assignments so that the Go linker never observes the original values. The returned slice is a sanitized copy of the provided flags, and the map contains the intercepted assignments keyed by fully-qualified variable name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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