binarycheck

package
v0.0.0-...-f07bf43 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckLinuxKernelVersion

func CheckLinuxKernelVersion() (*LinuxInfo, []CompatibilityIssue)

CheckLinuxKernelVersion checks Linux kernel version compatibility

func CheckWindowsARM64

func CheckWindowsARM64() (*WindowsInfo, []CompatibilityIssue)

CheckWindowsARM64 checks Windows ARM64/ARM64EC process mode

func CheckWindowsCompiler

func CheckWindowsCompiler() (*WindowsInfo, []CompatibilityIssue)

CheckWindowsCompiler detects Windows compiler and runtime availability

func FormatIssues

func FormatIssues(issues []CompatibilityIssue) string

FormatIssues formats compatibility issues for display

Types

type BinaryInfo

type BinaryInfo struct {
	Path        string
	IsELF       bool
	IsScript    bool
	ELFClass    string // "32-bit" or "64-bit"
	Interpreter string // Dynamic linker path (e.g., /lib64/ld-linux-x86-64.so.2)
	Machine     string // Architecture (e.g., "x86-64", "ARM")
	Shebang     string // For scripts
}

BinaryInfo contains information about a binary file

func CheckBinary

func CheckBinary(path string) (*BinaryInfo, error)

CheckBinary inspects a binary file and returns information about it

type CompatibilityIssue

type CompatibilityIssue struct {
	Severity string // "error", "warning", "info"
	Message  string
	Hint     string // Actionable suggestion
}

CompatibilityIssue describes a compatibility problem

func CheckCompatibility

func CheckCompatibility(info *BinaryInfo) []CompatibilityIssue

CheckCompatibility checks if a binary is compatible with the host system

func CheckMacOSDeploymentTarget

func CheckMacOSDeploymentTarget(binaryPath string) (*macOSInfo, []CompatibilityIssue)

CheckMacOSDeploymentTarget checks macOS binary compatibility

func CheckWindowsScriptShims

func CheckWindowsScriptShims(scriptPath string) []CompatibilityIssue

CheckWindowsScriptShims checks if scripts need .cmd/.ps1 wrapper shims

func SuggestGlibcCompatibility

func SuggestGlibcCompatibility(requiredGlibc, currentGlibc string) []CompatibilityIssue

SuggestGlibcCompatibility suggests remediation for glibc version mismatches

type LibcInfo

type LibcInfo struct {
	Type    string // "glibc", "musl", "unknown"
	Version string // Version string if available
	Path    string // Path to the libc
}

LibcInfo contains information about the system's C library

func DetectLibc

func DetectLibc() *LibcInfo

DetectLibc detects the system's C library type and version

type LinuxInfo

type LinuxInfo struct {
	KernelVersion string
	KernelMajor   int
	KernelMinor   int
	KernelPatch   int
	GlibcVersion  string
	LibcType      string // "glibc" or "musl"
}

LinuxInfo contains Linux-specific information

type PlatformInfo

type PlatformInfo struct {
	OS      string
	Arch    string
	Details map[string]string
}

PlatformInfo contains platform-specific information

func GetPlatformInfo

func GetPlatformInfo() *PlatformInfo

GetPlatformInfo returns comprehensive platform information

type WindowsInfo

type WindowsInfo struct {
	Compiler     string // "MSVC", "MinGW", "unknown"
	HasCLExe     bool   // cl.exe available
	HasVCRuntime bool   // Visual C++ runtime available
	ProcessMode  string // "ARM64", "ARM64EC", "x64", "x86"
	IsARM64EC    bool   // Running in ARM64EC mode
}

WindowsInfo contains Windows-specific information

Jump to

Keyboard shortcuts

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