ldd

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DebianGetDependencies

func DebianGetDependencies(output string) []string

DebianGetDependencies parses the ldd output and figure out the required dependencies in term of Debian packages

func RPMGetDependencies

func RPMGetDependencies(output string) []string

RPMGetDependencies parses the ldd output and figure out the required dependencies in term of Debian packages

Types

type GetDependenciesFn

type GetDependenciesFn func(string) []string

GetDependenciesFn is a function "pointer" for a distribution-specific function that parses the output of ldd and find the binary packages associated to the dependencies expressed in the ldd output.

type Module

type Module struct {
	GetDependencies GetDependenciesFn
}

Module represents a distribution-specific module that can handle output from ldd.

func DebianLoad

func DebianLoad() (bool, Module)

DebianLoad is the function called to see if the module is usable on the current system. If so, the module structure returned has all the functions required for Debian based systems.

func Detect

func Detect() (Module, error)

Detect finds the ldd module applicable to the current system

func RPMLoad

func RPMLoad() (bool, Module)

RpmLoad is the function called to see if the module is usable on the current system. If so, the module structure returned has all the functions required for RPM-based systems.

func (*Module) GetPackageDependenciesForFile

func (m *Module) GetPackageDependenciesForFile(file string) []string

GetPackageDependenciesForFile finds all the binary-package dependencies for a specific file, by running ldd and the appropriate module for the target linux distribution

Jump to

Keyboard shortcuts

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