versionutil

package
v0.78.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Overview

Holds the CLI related version functions that unifies handling version printing in all CLIs binaries.

Extends the https://github.com/prometheus/common/blob/main/version/info.go package by adding common CLI support and test coverage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Print

func Print(out io.Writer, program string)

Print version information to a given out writer.

func RegisterFlags

func RegisterFlags(fs *flag.FlagSet)

RegisterFlags registers version related flags to core.

func RegisterIntoKingpinFlags

func RegisterIntoKingpinFlags(app *kingpin.Application)

RegisterIntoKingpinFlags registers version related flags in kingpin framework.

func RegisterParseFlags

func RegisterParseFlags()

RegisterParseFlags registers and parses version related flags.

func ShouldPrintVersion

func ShouldPrintVersion() bool

ShouldPrintVersion returns true if version should be printed. Use Print function to print version information.

Types

This section is empty.

Jump to

Keyboard shortcuts

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