version

package
v1.202.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "test" // Default version; will be overridden during build

Version holds the current version of the Atmos CLI. It can be set dynamically during build time using ldflags.

Functions

func ValidateConstraint added in v1.201.0

func ValidateConstraint(constraintStr string) (bool, error)

ValidateConstraint checks if the current Atmos version satisfies the given constraint. Returns (satisfied bool, error). If constraintStr is empty, returns (true, nil).

The constraint string uses hashicorp/go-version syntax (same as Terraform):

  • ">=1.2.3" - Minimum version
  • "<2.0.0" - Maximum version (exclusive)
  • ">=1.2.3, <2.0.0" - Range (AND logic)
  • ">=2.5.0, !=2.7.0, <3.0.0" - Complex (multiple AND constraints)
  • "~>1.2" - Pessimistic constraint (>=1.2.0, <1.3.0)
  • "~>1.2.3" - Pessimistic constraint (>=1.2.3, <1.3.0)
  • "1.2.3" - Exact version

Types

This section is empty.

Jump to

Keyboard shortcuts

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