diff --git a/go.mod b/go.mod index 554c3586d..7a272aae5 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.6.0 github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.3.0 github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 - github.com/Azure/go-autorest/autorest v0.11.29 + github.com/Azure/go-autorest/autorest v0.11.30 github.com/container-storage-interface/spec v1.11.0 github.com/go-ini/ini v1.67.0 github.com/golang/protobuf v1.5.4 diff --git a/go.sum b/go.sum index dd748ea30..b98ee425d 100644 --- a/go.sum +++ b/go.sum @@ -44,8 +44,8 @@ github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 h1:YUUxeiOWgdAQE3pXt github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2/go.mod h1:dmXQgZuiSubAecswZE+Sm8jkvEa7kQgTPVRvwL/nd0E= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.29 h1:I4+HL/JDvErx2LjyzaVxllw2lRDB5/BT2Bm4g20iqYw= -github.com/Azure/go-autorest/autorest v0.11.29/go.mod h1:ZtEzC4Jy2JDrZLxvWs8LrBWEBycl1hbT1eknI8MtfAs= +github.com/Azure/go-autorest/autorest v0.11.30 h1:iaZ1RGz/ALZtN5eq4Nr1SOFSlf2E4pDI3Tcsl+dZPVE= +github.com/Azure/go-autorest/autorest v0.11.30/go.mod h1:t1kpPIOpIVX7annvothKvb0stsrXa37i7b+xpmBW8Fs= github.com/Azure/go-autorest/autorest/adal v0.9.22/go.mod h1:XuAbAEUv2Tta//+voMI038TrJBqjKam0me7qR+L8Cmk= github.com/Azure/go-autorest/autorest/adal v0.9.24 h1:BHZfgGsGwdkHDyZdtQRQk1WeUdW0m2WPAwuHZwUi5i4= github.com/Azure/go-autorest/autorest/adal v0.9.24/go.mod h1:7T1+g0PYFmACYW5LlG2fcoPiPlFHjClyRGL7dRlP5c8= @@ -324,7 +324,6 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= diff --git a/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go b/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go index 2af5030a1..c58d7b7b8 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go +++ b/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go @@ -190,7 +190,7 @@ func buildCanonicalizedResource(accountName, uri string, keyType SharedKeyType) } } - return string(cr.Bytes()), nil + return cr.String(), nil } func getCanonicalizedAccountName(accountName string) string { @@ -289,7 +289,7 @@ func buildCanonicalizedHeader(headers http.Header) string { ch.WriteRune('\n') } - return strings.TrimSuffix(string(ch.Bytes()), "\n") + return strings.TrimSuffix(ch.String(), "\n") } func createAuthorizationHeader(accountName string, accountKey []byte, canonicalizedString string, keyType SharedKeyType) string { diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/async.go b/vendor/github.com/Azure/go-autorest/autorest/azure/async.go index 45575eedb..f119b11d4 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/async.go +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/async.go @@ -19,7 +19,7 @@ import ( "context" "encoding/json" "fmt" - "io/ioutil" + "io" "net/http" "net/url" "strings" @@ -318,11 +318,11 @@ func (f Future) GetResult(sender autorest.Sender) (*http.Response, error) { if err == nil && resp.Body != nil { // copy the body and close it so callers don't have to defer resp.Body.Close() - b, err := ioutil.ReadAll(resp.Body) + b, err := io.ReadAll(resp.Body) if err != nil { return resp, err } - resp.Body = ioutil.NopCloser(bytes.NewReader(b)) + resp.Body = io.NopCloser(bytes.NewReader(b)) } return resp, err } @@ -459,12 +459,12 @@ func (pt *pollingTrackerBase) updateRawBody() error { pt.rawBody = map[string]interface{}{} if pt.resp.ContentLength != 0 { defer pt.resp.Body.Close() - b, err := ioutil.ReadAll(pt.resp.Body) + b, err := io.ReadAll(pt.resp.Body) if err != nil { return autorest.NewErrorWithError(err, "pollingTrackerBase", "updateRawBody", nil, "failed to read response body") } // put the body back so it's available to other callers - pt.resp.Body = ioutil.NopCloser(bytes.NewReader(b)) + pt.resp.Body = io.NopCloser(bytes.NewReader(b)) // observed in 204 responses over HTTP/2.0; the content length is -1 but body is empty if len(b) == 0 { return nil @@ -516,11 +516,11 @@ func (pt *pollingTrackerBase) updateErrorFromResponse() { re := respErr{} defer pt.resp.Body.Close() var b []byte - if b, err = ioutil.ReadAll(pt.resp.Body); err != nil { + if b, err = io.ReadAll(pt.resp.Body); err != nil { goto Default } // put the body back so it's available to other callers - pt.resp.Body = ioutil.NopCloser(bytes.NewReader(b)) + pt.resp.Body = io.NopCloser(bytes.NewReader(b)) if len(b) == 0 { goto Default } diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go b/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go index 868345db6..09c870809 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go @@ -20,7 +20,7 @@ import ( "bytes" "encoding/json" "fmt" - "io/ioutil" + "io" "net/http" "regexp" "strconv" @@ -333,7 +333,7 @@ func WithErrorUnlessStatusCode(codes ...int) autorest.RespondDecorator { // Copy and replace the Body in case it does not contain an error object. // This will leave the Body available to the caller. b, decodeErr := autorest.CopyAndDecode(encodedAs, resp.Body, &e) - resp.Body = ioutil.NopCloser(&b) + resp.Body = io.NopCloser(&b) if decodeErr != nil { return fmt.Errorf("autorest/azure: error response cannot be parsed: %q error: %v", b, decodeErr) } diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go b/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go index b0a53769f..4684291a8 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go @@ -17,7 +17,6 @@ package azure import ( "encoding/json" "fmt" - "io/ioutil" "os" "strings" ) @@ -315,7 +314,7 @@ func EnvironmentFromName(name string) (Environment, error) { // This function is particularly useful in the Hybrid Cloud model, where one must define their own // endpoints. func EnvironmentFromFile(location string) (unmarshaled Environment, err error) { - fileContents, err := ioutil.ReadFile(location) + fileContents, err := os.ReadFile(location) if err != nil { return } diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/metadata_environment.go b/vendor/github.com/Azure/go-autorest/autorest/azure/metadata_environment.go index 507f9e95c..f436a4512 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/metadata_environment.go +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/metadata_environment.go @@ -3,7 +3,7 @@ package azure import ( "encoding/json" "fmt" - "io/ioutil" + "io" "net/http" "strings" @@ -236,7 +236,7 @@ func retrieveMetadataEnvironment(endpoint string) (environment environmentMetada return environment, err } defer response.Body.Close() - jsonResponse, err := ioutil.ReadAll(response.Body) + jsonResponse, err := io.ReadAll(response.Body) if err != nil { return environment, err } diff --git a/vendor/github.com/Azure/go-autorest/autorest/client.go b/vendor/github.com/Azure/go-autorest/autorest/client.go index bb5f9396e..b2f2357e7 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/client.go +++ b/vendor/github.com/Azure/go-autorest/autorest/client.go @@ -20,7 +20,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "log" "net/http" "strings" @@ -106,14 +105,14 @@ func (li LoggingInspector) WithInspection() PrepareDecorator { defer r.Body.Close() - r.Body = ioutil.NopCloser(io.TeeReader(r.Body, &body)) + r.Body = io.NopCloser(io.TeeReader(r.Body, &body)) if err := r.Write(&b); err != nil { return nil, fmt.Errorf("Failed to write response: %v", err) } li.Logger.Printf(requestFormat, b.String()) - r.Body = ioutil.NopCloser(&body) + r.Body = io.NopCloser(&body) return p.Prepare(r) }) } @@ -129,14 +128,14 @@ func (li LoggingInspector) ByInspecting() RespondDecorator { return ResponderFunc(func(resp *http.Response) error { var body, b bytes.Buffer defer resp.Body.Close() - resp.Body = ioutil.NopCloser(io.TeeReader(resp.Body, &body)) + resp.Body = io.NopCloser(io.TeeReader(resp.Body, &body)) if err := resp.Write(&b); err != nil { return fmt.Errorf("Failed to write response: %v", err) } li.Logger.Printf(responseFormat, b.String()) - resp.Body = ioutil.NopCloser(&body) + resp.Body = io.NopCloser(&body) return r.Respond(resp) }) } diff --git a/vendor/github.com/Azure/go-autorest/autorest/preparer.go b/vendor/github.com/Azure/go-autorest/autorest/preparer.go index 121a66fa8..f6de8c5e9 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/preparer.go +++ b/vendor/github.com/Azure/go-autorest/autorest/preparer.go @@ -21,7 +21,6 @@ import ( "encoding/xml" "fmt" "io" - "io/ioutil" "mime/multipart" "net/http" "net/url" @@ -268,7 +267,7 @@ func WithBytes(input *[]byte) PrepareDecorator { } r.ContentLength = int64(len(*input)) - r.Body = ioutil.NopCloser(bytes.NewReader(*input)) + r.Body = io.NopCloser(bytes.NewReader(*input)) } return r, err }) @@ -296,7 +295,7 @@ func WithFormData(v url.Values) PrepareDecorator { setHeader(r, http.CanonicalHeaderKey(headerContentType), mimeTypeFormPost) r.ContentLength = int64(len(s)) - r.Body = ioutil.NopCloser(strings.NewReader(s)) + r.Body = io.NopCloser(strings.NewReader(s)) } return r, err }) @@ -331,7 +330,7 @@ func WithMultiPartFormData(formDataParameters map[string]interface{}) PrepareDec return r, err } setHeader(r, http.CanonicalHeaderKey(headerContentType), writer.FormDataContentType()) - r.Body = ioutil.NopCloser(bytes.NewReader(body.Bytes())) + r.Body = io.NopCloser(bytes.NewReader(body.Bytes())) r.ContentLength = int64(body.Len()) return r, err } @@ -346,11 +345,11 @@ func WithFile(f io.ReadCloser) PrepareDecorator { return PreparerFunc(func(r *http.Request) (*http.Request, error) { r, err := p.Prepare(r) if err == nil { - b, err := ioutil.ReadAll(f) + b, err := io.ReadAll(f) if err != nil { return r, err } - r.Body = ioutil.NopCloser(bytes.NewReader(b)) + r.Body = io.NopCloser(bytes.NewReader(b)) r.ContentLength = int64(len(b)) } return r, err @@ -396,7 +395,7 @@ func WithString(v string) PrepareDecorator { r, err := p.Prepare(r) if err == nil { r.ContentLength = int64(len(v)) - r.Body = ioutil.NopCloser(strings.NewReader(v)) + r.Body = io.NopCloser(strings.NewReader(v)) } return r, err }) @@ -413,7 +412,7 @@ func WithJSON(v interface{}) PrepareDecorator { b, err := json.Marshal(v) if err == nil { r.ContentLength = int64(len(b)) - r.Body = ioutil.NopCloser(bytes.NewReader(b)) + r.Body = io.NopCloser(bytes.NewReader(b)) } } return r, err @@ -436,7 +435,7 @@ func WithXML(v interface{}) PrepareDecorator { r.ContentLength = int64(len(bytesWithHeader)) setHeader(r, headerContentLength, fmt.Sprintf("%d", len(bytesWithHeader))) - r.Body = ioutil.NopCloser(bytes.NewReader(bytesWithHeader)) + r.Body = io.NopCloser(bytes.NewReader(bytesWithHeader)) } } return r, err diff --git a/vendor/github.com/Azure/go-autorest/autorest/responder.go b/vendor/github.com/Azure/go-autorest/autorest/responder.go index 349e1963a..69d4b2b67 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/responder.go +++ b/vendor/github.com/Azure/go-autorest/autorest/responder.go @@ -20,7 +20,6 @@ import ( "encoding/xml" "fmt" "io" - "io/ioutil" "net/http" "strings" ) @@ -111,7 +110,7 @@ func ByDiscardingBody() RespondDecorator { return ResponderFunc(func(resp *http.Response) error { err := r.Respond(resp) if err == nil && resp != nil && resp.Body != nil { - if _, err := io.Copy(ioutil.Discard, resp.Body); err != nil { + if _, err := io.Copy(io.Discard, resp.Body); err != nil { return fmt.Errorf("Error discarding the response body: %v", err) } } @@ -160,7 +159,7 @@ func ByUnmarshallingBytes(v *[]byte) RespondDecorator { return ResponderFunc(func(resp *http.Response) error { err := r.Respond(resp) if err == nil { - bytes, errInner := ioutil.ReadAll(resp.Body) + bytes, errInner := io.ReadAll(resp.Body) if errInner != nil { err = fmt.Errorf("Error occurred reading http.Response#Body - Error = '%v'", errInner) } else { @@ -179,7 +178,7 @@ func ByUnmarshallingJSON(v interface{}) RespondDecorator { return ResponderFunc(func(resp *http.Response) error { err := r.Respond(resp) if err == nil { - b, errInner := ioutil.ReadAll(resp.Body) + b, errInner := io.ReadAll(resp.Body) // Some responses might include a BOM, remove for successful unmarshalling b = bytes.TrimPrefix(b, []byte("\xef\xbb\xbf")) if errInner != nil { @@ -203,7 +202,7 @@ func ByUnmarshallingXML(v interface{}) RespondDecorator { return ResponderFunc(func(resp *http.Response) error { err := r.Respond(resp) if err == nil { - b, errInner := ioutil.ReadAll(resp.Body) + b, errInner := io.ReadAll(resp.Body) if errInner != nil { err = fmt.Errorf("Error occurred reading http.Response#Body - Error = '%v'", errInner) } else { @@ -232,9 +231,9 @@ func WithErrorUnlessStatusCode(codes ...int) RespondDecorator { resp.Status) if resp.Body != nil { defer resp.Body.Close() - b, _ := ioutil.ReadAll(resp.Body) + b, _ := io.ReadAll(resp.Body) derr.ServiceError = b - resp.Body = ioutil.NopCloser(bytes.NewReader(b)) + resp.Body = io.NopCloser(bytes.NewReader(b)) } err = derr } diff --git a/vendor/github.com/Azure/go-autorest/autorest/retriablerequest.go b/vendor/github.com/Azure/go-autorest/autorest/retriablerequest.go index fa11dbed7..7634b0f57 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/retriablerequest.go +++ b/vendor/github.com/Azure/go-autorest/autorest/retriablerequest.go @@ -17,7 +17,6 @@ package autorest import ( "bytes" "io" - "io/ioutil" "net/http" ) @@ -41,12 +40,12 @@ func (rr *RetriableRequest) prepareFromByteReader() (err error) { return err } } else { - b, err = ioutil.ReadAll(rr.req.Body) + b, err = io.ReadAll(rr.req.Body) if err != nil { return err } } rr.br = bytes.NewReader(b) - rr.req.Body = ioutil.NopCloser(rr.br) + rr.req.Body = io.NopCloser(rr.br) return err } diff --git a/vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.7.go b/vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.7.go index 4c87030e8..8340bda40 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.7.go +++ b/vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.7.go @@ -19,7 +19,7 @@ package autorest import ( "bytes" - "io/ioutil" + "io" "net/http" ) @@ -33,10 +33,10 @@ type RetriableRequest struct { func (rr *RetriableRequest) Prepare() (err error) { // preserve the request body; this is to support retry logic as // the underlying transport will always close the reqeust body - if rr.req.Body != nil { + if rr.req.Body != nil && rr.req.Body != http.NoBody { if rr.br != nil { _, err = rr.br.Seek(0, 0 /*io.SeekStart*/) - rr.req.Body = ioutil.NopCloser(rr.br) + rr.req.Body = io.NopCloser(rr.br) } if err != nil { return err diff --git a/vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.8.go b/vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.8.go index 05847c08b..e36d4b046 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.8.go +++ b/vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.8.go @@ -20,7 +20,6 @@ package autorest import ( "bytes" "io" - "io/ioutil" "net/http" ) @@ -35,12 +34,12 @@ type RetriableRequest struct { func (rr *RetriableRequest) Prepare() (err error) { // preserve the request body; this is to support retry logic as // the underlying transport will always close the reqeust body - if rr.req.Body != nil { + if rr.req.Body != nil && rr.req.Body != http.NoBody { if rr.rc != nil { rr.req.Body = rr.rc } else if rr.br != nil { _, err = rr.br.Seek(0, io.SeekStart) - rr.req.Body = ioutil.NopCloser(rr.br) + rr.req.Body = io.NopCloser(rr.br) } if err != nil { return err diff --git a/vendor/github.com/Azure/go-autorest/autorest/utility.go b/vendor/github.com/Azure/go-autorest/autorest/utility.go index d35b3850a..8c5eb5dbe 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/utility.go +++ b/vendor/github.com/Azure/go-autorest/autorest/utility.go @@ -20,7 +20,6 @@ import ( "encoding/xml" "fmt" "io" - "io/ioutil" "net" "net/http" "net/url" @@ -217,7 +216,7 @@ func IsTemporaryNetworkError(err error) bool { // DrainResponseBody reads the response body then closes it. func DrainResponseBody(resp *http.Response) error { if resp != nil && resp.Body != nil { - _, err := io.Copy(ioutil.Discard, resp.Body) + _, err := io.Copy(io.Discard, resp.Body) resp.Body.Close() return err } diff --git a/vendor/modules.txt b/vendor/modules.txt index c7826f44f..5bf80f4df 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -95,7 +95,7 @@ github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/service # github.com/Azure/go-autorest v14.2.0+incompatible ## explicit github.com/Azure/go-autorest -# github.com/Azure/go-autorest/autorest v0.11.29 +# github.com/Azure/go-autorest/autorest v0.11.30 ## explicit; go 1.15 github.com/Azure/go-autorest/autorest github.com/Azure/go-autorest/autorest/azure