version

package
v0.69.2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2025 License: BSD-3-Clause Imports: 14 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 InitManager added in v0.69.1

func InitManager(
	ctx context.Context,
)

InitManager initializes the version manager, we have an explicit init so we can capture the root context to ensure appropriate cancellation during the version fetching if necessary.

Types

type Manager added in v0.69.1

type Manager interface {
	GetLatestVersion(ctx context.Context) *gover.Version
	DisplayNewVersionAvailable(ctx context.Context)
}

Manager is the config manager interface defining the version manager methods.

func GetManager added in v0.69.1

func GetManager() Manager

Jump to

Keyboard shortcuts

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