version

package
v1.39.18 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Get = func() *Info {

	return &Info{
		Version:       version,
		ConfigVersion: latest.Version,
		GitCommit:     gitCommit,
		BuildDate:     buildDate,
		GoVersion:     runtime.Version(),
		Compiler:      runtime.Compiler,
		Platform:      platform,
	}
}

Get returns the version and buildtime information about the binary. Can be overridden for tests.

View Source
var SetClient = func(userAgent string) {
	if allowedUser := user.IsAllowedUser(userAgent); allowedUser {
		client = userAgent
	}
}

Functions

func ParseVersion added in v0.12.0

func ParseVersion(version string) (semver.Version, error)

func UserAgent added in v0.6.1

func UserAgent() string

UserAgent returns a conformant value for HTTP `User-Agent` headers. It is of the form `skaffold/<version> (<os>/<arch>)`, and the version will be omitted if not available.

func UserAgentWithClient added in v1.24.0

func UserAgentWithClient() string

UserAgentWithClient returns a conformant value for HTTP `User-Agent` headers that includes the client value provided with the `--user` flag. If there is no client value, then the value will be equivalent to `UserAgent()`. Otherwise it is of the form `skaffold/<version> (<os>/<arch>) <client>`, and the version will be omitted if not available. Use UserAgentWithClient method to record requests from skaffold CLI users vs other clients.

Types

type Info

type Info struct {
	Version       string
	ConfigVersion string
	GitVersion    string
	GitCommit     string
	BuildDate     string
	GoVersion     string
	Compiler      string
	Platform      string
	User          string
}

Jump to

Keyboard shortcuts

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