Initial commit
This commit is contained in:
24
vendor/github.com/hyperhq/hypercli/dockerversion/useragent.go
generated
vendored
Normal file
24
vendor/github.com/hyperhq/hypercli/dockerversion/useragent.go
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
package dockerversion
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
|
||||
"github.com/hyperhq/hypercli/pkg/parsers/kernel"
|
||||
"github.com/hyperhq/hypercli/pkg/useragent"
|
||||
)
|
||||
|
||||
// DockerUserAgent is the User-Agent the Docker client uses to identify itself.
|
||||
// It is populated from version information of different components.
|
||||
func DockerUserAgent() string {
|
||||
httpVersion := make([]useragent.VersionInfo, 0, 6)
|
||||
httpVersion = append(httpVersion, useragent.VersionInfo{Name: "hyper", Version: Version})
|
||||
httpVersion = append(httpVersion, useragent.VersionInfo{Name: "go", Version: runtime.Version()})
|
||||
httpVersion = append(httpVersion, useragent.VersionInfo{Name: "git-commit", Version: GitCommit})
|
||||
if kernelVersion, err := kernel.GetKernelVersion(); err == nil {
|
||||
httpVersion = append(httpVersion, useragent.VersionInfo{Name: "kernel", Version: kernelVersion.String()})
|
||||
}
|
||||
httpVersion = append(httpVersion, useragent.VersionInfo{Name: "os", Version: runtime.GOOS})
|
||||
httpVersion = append(httpVersion, useragent.VersionInfo{Name: "arch", Version: runtime.GOARCH})
|
||||
|
||||
return useragent.AppendVersions("", httpVersion...)
|
||||
}
|
||||
13
vendor/github.com/hyperhq/hypercli/dockerversion/version_lib.go
generated
vendored
Normal file
13
vendor/github.com/hyperhq/hypercli/dockerversion/version_lib.go
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
// +build !autogen
|
||||
|
||||
// Package dockerversion is auto-generated at build-time
|
||||
package dockerversion
|
||||
|
||||
// Default build-time variable for library-import.
|
||||
// This file is overridden on build with build-time informations.
|
||||
const (
|
||||
GitCommit string = "library-import"
|
||||
Version string = "library-import"
|
||||
BuildTime string = "library-import"
|
||||
IAmStatic string = "library-import"
|
||||
)
|
||||
Reference in New Issue
Block a user