version

package
v0.26.0 Latest Latest
Warning

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

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

Documentation

Overview

Copyright © 2025 KubeRocketAI Team

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "dev"
	Commit    = "unknown"
	Date      = "unknown"
	BuiltBy   = "unknown"
	Framework = "1.0.0"
)

Build variables (set during build time)

View Source
var CompatibilityMatrix = map[string][]string{
	"1.0.0": {"1.0.0", "1.0.1", "1.0.2"},
	"1.1.0": {"1.0.0", "1.0.1", "1.0.2", "1.1.0", "1.1.1"},
	"1.2.0": {"1.1.0", "1.1.1", "1.2.0", "1.2.1"},
	"2.0.0": {"2.0.0", "2.0.1", "2.1.0"},
}

CompatibilityMatrix defines CLI-framework version compatibility

Functions

func CompareVersions

func CompareVersions(current, latest string) (bool, error)

CompareVersions compares current version with latest version Returns true if latest is newer than current, false otherwise

func GetCompatibilityMatrix

func GetCompatibilityMatrix() map[string][]string

GetCompatibilityMatrix returns the current compatibility matrix

func GetCompatibleFrameworkVersions

func GetCompatibleFrameworkVersions(cliVersion string) ([]string, error)

GetCompatibleFrameworkVersions returns compatible framework versions for given CLI version

func GetCurrentVersion

func GetCurrentVersion() string

GetCurrentVersion returns the current CLI version

func IsFrameworkVersionCompatible

func IsFrameworkVersionCompatible(cliVersion, frameworkVersion string) bool

IsFrameworkVersionCompatible checks if a specific framework version is compatible with CLI

func ParseVersion

func ParseVersion(version string) (*semver.Version, error)

ParseVersion parses a version string and returns a semver.Version

func ValidateCompatibility

func ValidateCompatibility(cliVersion, frameworkVersion string) error

ValidateCompatibility checks if CLI and framework versions are compatible

Types

type VersionInfo

type VersionInfo struct {
	Version   string `json:"version"`
	Commit    string `json:"commit"`
	Date      string `json:"date"`
	BuiltBy   string `json:"built_by"`
	Framework string `json:"framework"`
	GoVersion string `json:"go_version"`
	Platform  string `json:"platform"`
}

VersionInfo contains detailed version information

func GetVersionInfo

func GetVersionInfo() VersionInfo

GetVersionInfo returns detailed version information

func (VersionInfo) String

func (v VersionInfo) String() string

String returns a formatted version string

Jump to

Keyboard shortcuts

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