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 ¶
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.
Click to show internal directories.
Click to hide internal directories.