version

package
v0.67.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2025 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "0.0.0"
)

Version variables set at build time (e.g., with -ldflags).

View Source
var VersionCmd = &cobra.Command{
	Use:   "version",
	Short: "Show containerlab version or upgrade",
	RunE: func(_ *cobra.Command, _ []string) error {
		fmt.Println(projASCIILogo)
		verSlug := docsLinkFromVer(Version)
		fmt.Printf("    version: %s\n", Version)
		fmt.Printf("     commit: %s\n", commit)
		fmt.Printf("       date: %s\n", date)
		fmt.Printf("     source: %s\n", repoUrl)
		fmt.Printf(" rel. notes: https://containerlab.dev/rn/%s\n", verSlug)
		return nil
	},
}

VersionCmd defines the version command.

Functions

func GetLatestClabVersion

func GetLatestClabVersion(ctx context.Context) chan string

GetLatestClabVersion optional function for a background check. It respects CLAB_VERSION_CHECK="disable" to skip remote calls. Typically used in your "deploy" or other commands if you want a background version check.

func NewVerNotification

func NewVerNotification(vc <-chan string)

NewVerNotification non-blocking check that prints an INFO log if a new version is available. Useful for "background" checks in long-running commands (like "deploy") where we don't want to block the user.

Types

This section is empty.

Jump to

Keyboard shortcuts

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