diff options
Diffstat (limited to 'vendor/github.com/yaegashi/msgraph.go/beta/RequestSite.go')
-rw-r--r-- | vendor/github.com/yaegashi/msgraph.go/beta/RequestSite.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/vendor/github.com/yaegashi/msgraph.go/beta/RequestSite.go b/vendor/github.com/yaegashi/msgraph.go/beta/RequestSite.go index d8cb8ab0..e1b59bd3 100644 --- a/vendor/github.com/yaegashi/msgraph.go/beta/RequestSite.go +++ b/vendor/github.com/yaegashi/msgraph.go/beta/RequestSite.go @@ -1,4 +1,4 @@ -// Code generated by msgraph-generate.go DO NOT EDIT. +// Code generated by msgraph.go/gen DO NOT EDIT. package msgraph @@ -129,9 +129,9 @@ func (r *SiteCollectionAddRequest) Paging(ctx context.Context, method, path stri } var values []Site for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -144,6 +144,7 @@ func (r *SiteCollectionAddRequest) Paging(ctx context.Context, method, path stri value []Site ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -231,9 +232,9 @@ func (r *SiteCollectionRemoveRequest) Paging(ctx context.Context, method, path s } var values []Site for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -246,6 +247,7 @@ func (r *SiteCollectionRemoveRequest) Paging(ctx context.Context, method, path s value []Site ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } |