github.com/blend/go-sdk@v1.20220411.3/r2/opt_client.go (about) 1 /* 2 3 Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file. 5 6 */ 7 8 package r2 9 10 import "net/http" 11 12 // OptClient sets the underlying client on the request. 13 // 14 // It is specifically useful to prevent churning allocations on 15 // sending repeated requests. 16 func OptClient(client *http.Client) Option { 17 return func(r *Request) error { 18 r.Client = client 19 return nil 20 } 21 }