Documentation
¶
Index ¶
- Variables
- func BuildBinary(mainFilePath string, targetBinaryPath string, moduleName string) error
- func CheckDependencyExists(name string) (string, bool)
- func CheckVersionCompatibility(foundVersion, declaredVersion string) (bool, string)
- func ExtractSemver(output string) (string, error)
- func GetAppDataDir(appName string) string
- func GetDestDir() (string, error)
- func GetPackageSrcDirPath() string
- func GetVersion(binaryPath string, customCommand []string) (string, error)
- func GetVersionWithFallbacks(binaryPath string) (string, error)
- func RunCommand(binaryPath string, args []string) (string, error)
- type BuildEnv
Constants ¶
This section is empty.
Variables ¶
var DefaultBuildEnv = BuildEnv{
CGOEnabled: "0",
GOOS: "linux",
GOARCH: "amd64",
}
var DefaultVersionCommands = [][]string{
{"-v"}, {"--v"}, {"version"}, {"-version"}, {"--version"},
}
DefaultVersionCommands is a predefined list of common flags and subcommands
var PackageFS embed.FS
var SrcDirPath string
Functions ¶
func BuildBinary ¶
func CheckDependencyExists ¶
func CheckVersionCompatibility ¶
CheckVersionCompatibility determines if a found version satisfies version constraints
func ExtractSemver ¶
ExtractSemver parses and validates a semantic version string (e.g., 1.2.3) from command output.
func GetAppDataDir ¶
func GetDestDir ¶
func GetPackageSrcDirPath ¶
func GetPackageSrcDirPath() string
func GetVersion ¶
GetVersion retrieves the version of a binary using a user-specified command or falls back to defaults
func GetVersionWithFallbacks ¶
GetVersionWithFallbacks attempts to retrieve a version using common flags and subcommands