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

@@ -20,6 +20,7 @@ import (
"encoding/xml"
"fmt"
"io"
"net"
"net/http"
"net/url"
"reflect"
@@ -216,3 +217,12 @@ func IsTokenRefreshError(err error) bool {
}
return false
}
// IsTemporaryNetworkError returns true if the specified error is a temporary network error or false
// if it's not. If the error doesn't implement the net.Error interface the return value is true.
func IsTemporaryNetworkError(err error) bool {
if netErr, ok := err.(net.Error); !ok || (ok && netErr.Temporary()) {
return true
}
return false
}