version

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 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.

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)

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 GetCurrentVersion

func GetCurrentVersion() string

GetCurrentVersion returns the current CLI version

func ParseVersion

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

ParseVersion parses a version string and returns a semver.Version

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