Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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.
var SetClient = func(userAgent string) { if allowedUser := user.IsAllowedUser(userAgent); allowedUser { client = userAgent } }
Functions ¶
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.