version

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package version provides the core build version and compatibility checks. The Version variable is set at build time via linker flags:

go build -ldflags="-X github.com/Muxcore-Media/core/internal/version.Version=1.0.0"

When not set, the default "0.0.0-dev" indicates a development build.

Index

Constants

This section is empty.

Variables

View Source
var Version = "0.0.0-dev"

Version is the semantic version of the running core binary. Set via linker flag at build time. Falls back to "0.0.0-dev".

Functions

func CheckModule

func CheckModule(moduleID, minCoreVersion string) error

CheckModule ensures a module's MinCoreVersion is compatible with the running core version. Returns nil if compatible, or a *CompatError if not.

Rules:

  • Empty MinCoreVersion is always compatible (backward compat).
  • Major version must match exactly. Different major = incompatible.
  • Minor version: core.Minor >= requested.Minor.
  • Patch version: if minor matches, core.Patch >= requested.Patch.

func String

func String() string

String returns a human-readable version string.

Types

type CompatError

type CompatError struct {
	ModuleID       string
	MinCoreVersion string
	CoreVersion    string
	Reason         string
}

CompatError describes why a module is incompatible with the running core.

func (*CompatError) Error

func (e *CompatError) Error() string

Jump to

Keyboard shortcuts

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