Skip to content

Commit

Permalink
Merge pull request #70 from microsoft/users/tedchamb/version
Browse files Browse the repository at this point in the history
Add version to UserAgent string
  • Loading branch information
tedchamb authored May 17, 2020
2 parents b4e2d50 + 5505615 commit 5203116
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion azuredevops/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ var SessionId = uuid.New().String()
var apiResourceLocationCache = make(map[string]*map[uuid.UUID]ApiResourceLocation)
var apiResourceLocationCacheLock = sync.RWMutex{}

var version = "5.1.0-b1" // todo: remove hardcoded version
var versionSuffix = " (dev)"

// Base user agent string. The UserAgent set on the connection will be appended to this.
var baseUserAgent = "go/" + runtime.Version() + " (" + runtime.GOOS + " " + runtime.GOARCH + ") azure-devops-go-api/0.0.0" // todo: get real version
var baseUserAgent = "go/" + runtime.Version() + " (" + runtime.GOOS + " " + runtime.GOARCH + ") azure-devops-go-api/" + version + versionSuffix

func NewClient(connection *Connection, baseUrl string) *Client {
client := &http.Client{}
Expand Down

0 comments on commit 5203116

Please sign in to comment.