Move version.go in its own package…
… making it possible to use in other packages ; and thus in the User-Agent header for the docker client. Also removing the dockerverion hack as it's not required anymore. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
4c54a003fa
commit
87a4d73556
6 changed files with 18 additions and 31 deletions
|
@ -15,6 +15,7 @@ import (
|
|||
"github.com/cenkalti/backoff"
|
||||
"github.com/containous/traefik/safe"
|
||||
"github.com/containous/traefik/types"
|
||||
"github.com/containous/traefik/version"
|
||||
"github.com/docker/engine-api/client"
|
||||
dockertypes "github.com/docker/engine-api/types"
|
||||
eventtypes "github.com/docker/engine-api/types/events"
|
||||
|
@ -38,8 +39,7 @@ type Docker struct {
|
|||
func (provider *Docker) createClient() (client.APIClient, error) {
|
||||
var httpClient *http.Client
|
||||
httpHeaders := map[string]string{
|
||||
// FIXME(vdemeester) use version here O:)
|
||||
"User-Agent": "Traefik",
|
||||
"User-Agent": "Traefik " + version.Version,
|
||||
}
|
||||
if provider.TLS != nil {
|
||||
config, err := provider.TLS.CreateTLSConfig()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue