This repository was archived by the owner on Jul 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ import (
34
34
"github.com/docker/compose-cli/pkg/api"
35
35
)
36
36
37
+ // UserAgentName is the default user agent used by the cli
38
+ const UserAgentName = "docker-cli"
39
+
37
40
// NewContainerGroupsClient get client toi manipulate containerGrouos
38
41
func NewContainerGroupsClient (subscriptionID string ) (containerinstance.ContainerGroupsClient , error ) {
39
42
authorizer , mgmtURL , err := getClientSetupData ()
@@ -52,7 +55,7 @@ func NewContainerGroupsClient(subscriptionID string) (containerinstance.Containe
52
55
}
53
56
54
57
func setupClient (aciClient * autorest.Client , auth autorest.Authorizer ) {
55
- aciClient .UserAgent = internal . UserAgentName + "/" + internal .Version
58
+ aciClient .UserAgent = UserAgentName + "/" + internal .Version
56
59
aciClient .Authorizer = auth
57
60
}
58
61
Original file line number Diff line number Diff line change @@ -79,9 +79,12 @@ type sdk struct {
79
79
// sdk implement API
80
80
var _ API = sdk {}
81
81
82
+ // UserAgentName is the ECS specific user agent used by the cli
83
+ const UserAgentName = "Docker CLI"
84
+
82
85
func newSDK (sess * session.Session ) sdk {
83
86
sess .Handlers .Build .PushBack (func (r * request.Request ) {
84
- request .AddToUserAgent (r , internal . ECSUserAgentName + "/" + internal .Version )
87
+ request .AddToUserAgent (r , UserAgentName + "/" + internal .Version )
85
88
})
86
89
return sdk {
87
90
ECS : ecs .New (sess ),
Original file line number Diff line number Diff line change 16
16
17
17
package internal
18
18
19
- const (
20
- // UserAgentName is the default user agent used by the cli
21
- UserAgentName = "docker-cli"
22
- // ECSUserAgentName is the ECS specific user agent used by the cli
23
- ECSUserAgentName = "Docker CLI"
24
- )
25
-
26
19
var (
27
20
// Version is the version of the CLI injected in compilation time
28
21
Version = "dev"
You can’t perform that action at this time.
0 commit comments