| Index: cipd/client/cipd/client.go
|
| diff --git a/cipd/client/cipd/client.go b/cipd/client/cipd/client.go
|
| index 53bc31ad3efb18ef453457f29364c06d4a88164f..0d73e8d01b506696b8316749d8042eca098f43d1 100644
|
| --- a/cipd/client/cipd/client.go
|
| +++ b/cipd/client/cipd/client.go
|
| @@ -74,9 +74,6 @@ const (
|
| // TagAttachTimeout is how long to wait for an instance to be processed when attaching tags.
|
| TagAttachTimeout = 3 * time.Minute
|
|
|
| - // UserAgent is HTTP user agent string for CIPD client.
|
| - UserAgent = "cipd 1.3"
|
| -
|
| // ServiceURL is URL of a backend to connect to by default.
|
| ServiceURL = "https://chrome-infra-packages.appspot.com"
|
| )
|
| @@ -110,6 +107,19 @@ var (
|
| ErrPackageNotFound = errors.New("no such package")
|
| )
|
|
|
| +var (
|
| + // UserAgent is HTTP user agent string for CIPD client.
|
| + UserAgent = "cipd 1.3"
|
| +)
|
| +
|
| +func init() {
|
| + ver, err := version.GetStartupVersion()
|
| + if err != nil {
|
| + return
|
| + }
|
| + UserAgent += fmt.Sprintf(" (%s@%s)", ver.PackageName, ver.InstanceID)
|
| +}
|
| +
|
| // UnixTime is time.Time that serializes to unix timestamp in JSON (represented
|
| // as a number of seconds since January 1, 1970 UTC).
|
| type UnixTime time.Time
|
|
|