From f874c88ee641881229b74bc5afa8f2490120d91b Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Mon, 8 Jul 2024 15:46:38 +0200 Subject: add ctx argument to Account.Capabilities --- object.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'object.go') diff --git a/object.go b/object.go index 1658273..28c33da 100644 --- a/object.go +++ b/object.go @@ -647,13 +647,13 @@ func contains(s []string, e string) bool { // hdr := NewContainerHeaders() // hdr.TempURLKey().Set(key) // c := o.Container() -// err := c.Update(hdr, nil) +// err := c.Update(ctx, hdr, nil) // // //...we can use it to generate temporary URLs. -// url := o.TempURL(key, "GET", time.Now().Add(10 * time.Minute)) +// url := o.TempURL(ctx, key, "GET", time.Now().Add(10 * time.Minute)) // resp, err := http.Get(url) // //This time, resp.StatusCode == 200 because the URL includes a token. -func (o *Object) TempURL(key, method string, expires time.Time) (string, error) { +func (o *Object) TempURL(ctx context.Context, key, method string, expires time.Time) (string, error) { urlStr, err := o.URL() if err != nil { return "", err @@ -663,7 +663,7 @@ func (o *Object) TempURL(key, method string, expires time.Time) (string, error) return "", err } - capabilities, err := o.c.a.Capabilities() + capabilities, err := o.c.a.Capabilities(ctx) if err != nil { return "", err } -- cgit v1.2.3