gobinary

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: Apache-2.0, BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package gobinary extracts packages from buildinfo inside go binaries files.

Index

Constants

View Source
const (
	// Name is the unique name of this extractor.
	Name = "go/binary"
)

Variables

This section is empty.

Functions

func New added in v0.1.2

New returns a Go binary extractor.

Types

type Extractor

type Extractor struct {

	// Stats is a stats collector for reporting metrics.
	Stats stats.Collector
	// contains filtered or unexported fields
}

Extractor extracts packages from buildinfo inside go binaries files.

func (Extractor) Extract

Extract returns a list of installed third party dependencies in a Go binary.

func (Extractor) FileRequired

func (e Extractor) FileRequired(api filesystem.FileAPI) bool

FileRequired returns true if the specified file is marked executable.

func (*Extractor) MaxFileSizeBytes added in v0.4.0

func (e *Extractor) MaxFileSizeBytes() int64

MaxFileSizeBytes returns the maximum size of a file that can be extracted.

func (Extractor) Name

func (e Extractor) Name() string

Name of the extractor.

func (Extractor) Requirements added in v0.1.3

func (e Extractor) Requirements() *plugin.Capabilities

Requirements of the extractor.

func (Extractor) Version

func (e Extractor) Version() int

Version of the extractor.

func (*Extractor) VersionFromContent added in v0.2.0

func (e *Extractor) VersionFromContent() bool

VersionFromContent returns whether module version extraction from binary content is enabled.

Jump to

Keyboard shortcuts

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