Update Azure Go SDK to v19.0.0

This commit is contained in:
Pengfei Ni
2018-07-24 17:00:27 +08:00
parent 5bf3b2119b
commit af1875fca6
103 changed files with 9156 additions and 8645 deletions

View File

@@ -22,8 +22,9 @@ import (
"log"
"net/http"
"net/http/cookiejar"
"runtime"
"time"
"github.com/Azure/go-autorest/version"
)
const (
@@ -41,15 +42,6 @@ const (
)
var (
// defaultUserAgent builds a string containing the Go version, system archityecture and OS,
// and the go-autorest version.
defaultUserAgent = fmt.Sprintf("Go/%s (%s-%s) go-autorest/%s",
runtime.Version(),
runtime.GOARCH,
runtime.GOOS,
Version(),
)
// StatusCodesForRetry are a defined group of status code for which the client will retry
StatusCodesForRetry = []int{
http.StatusRequestTimeout, // 408
@@ -179,7 +171,7 @@ func NewClientWithUserAgent(ua string) Client {
PollingDuration: DefaultPollingDuration,
RetryAttempts: DefaultRetryAttempts,
RetryDuration: DefaultRetryDuration,
UserAgent: defaultUserAgent,
UserAgent: version.UserAgent(),
}
c.Sender = c.sender()
c.AddToUserAgent(ua)