utils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectLibBPF

func DetectLibBPF()

DetectLibBPF checks if libbpf-dev is installed on the system Exits with fatal error if not found Can be skipped with --ignore-libbpf-detection flag

func ExecBpftool

func ExecBpftool(bpftoolPath string, args []string)

ExecBpftool executes bpftool with the given arguments Pipes stdout, stderr, and stdin through to the current process Exits with the same exit code as bpftool

func FindBpftool

func FindBpftool() (string, error)

FindBpftool locates the bpftool binary on the system Returns the path to bpftool or an error if not found

func IsVerbose added in v0.1.1

func IsVerbose(cmd *cobra.Command) bool

func ParseMapType

func ParseMapType(typeStr string) ebpf.MapType

ParseMapType converts a string map type name to ebpf.MapType

func ResolveCwdPath

func ResolveCwdPath(path string) (string, error)

ResolveCwdPath converts a path to absolute path relative to current working directory If path is already absolute, returns it as-is

func ResolveProjectPath

func ResolveProjectPath(relativePath string) (string, error)

ResolveProjectPath converts a path to absolute path relative to project root Returns absolute path from project root

func WithProjectRoot

func WithProjectRoot(fn func() error) error

WithProjectRoot executes a function with the working directory changed to project root Automatically restores the original working directory after execution

Types

This section is empty.

Jump to

Keyboard shortcuts

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