utils

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsurePathExists

func EnsurePathExists(path string) error

EnsurePathExists ensures that the given path exists, creating it if necessary.

func GetBinPath

func GetBinPath(cmd *cobra.Command) (string, error)

GetBinPath retrieves the bin path from the command flags or returns the default path.

func GetCachePath

func GetCachePath() (string, error)

GetCachePath returns the path to the releases cache file.

func GetDefaultBinPath

func GetDefaultBinPath() (string, error)

GetDefaultBinPath returns the default bin path for in-use talosctl binary.

func GetDefaultVrsPath

func GetDefaultVrsPath() (string, error)

GetDefaultVrsPath returns the default bin path for downloaded talosctl binaries.

func GetVrsInUse

func GetVrsInUse(binPath string) (string, error)

GetVrsInUse returns the version of talosctl currently in use from the given binPath.

func GetVrsPath

func GetVrsPath(cmd *cobra.Command) (string, error)

GetBinPath retrieves the vrs path from the command flags or returns the default path.

func ListInstalledVersions

func ListInstalledVersions(vrsPath string) ([]*semver.Version, error)

ListInstalledVersions lists all installed talosctl versions in the given vrsPath.

Types

This section is empty.

Jump to

Keyboard shortcuts

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