Skip to content

Commit

Permalink
feat: pass testcontainers-go version as HTTP header (#1491)
Browse files Browse the repository at this point in the history
* feat: pass testcontainers-go version as HTTP header

* chore: use condensed format for user agent

Co-authored-by: Sergei Egorov <bsideup@gmail.com>

* fix: indent

---------

Co-authored-by: Sergei Egorov <bsideup@gmail.com>
  • Loading branch information
mdelapenya and bsideup committed Aug 11, 2023
1 parent 9ffda69 commit 2e85c30
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/testcontainersdocker/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"path/filepath"

"github.com/docker/docker/client"
"github.com/testcontainers/testcontainers-go/internal"
"github.com/testcontainers/testcontainers-go/internal/config"
"github.com/testcontainers/testcontainers-go/internal/testcontainerssession"
)
Expand All @@ -31,7 +32,8 @@ func NewClient(ctx context.Context, ops ...client.Opt) (*client.Client, error) {

opts = append(opts, client.WithHTTPHeaders(
map[string]string{
"x-tc-sid": testcontainerssession.String(),
"x-tc-sid": testcontainerssession.String(),
"User-Agent": "tc-go/" + internal.Version,
}),
)

Expand Down

0 comments on commit 2e85c30

Please sign in to comment.