forked from TrueCloudLab/frostfs-sdk-go
[#48] client: Remove ctx == nil
checks
Much less useful after we made context to be passed explicitly. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
55b06cd764
commit
1bfa9ecdb0
17 changed files with 9 additions and 71 deletions
|
@ -245,11 +245,6 @@ func (x *ObjectWriter) Close() (*ResObjectPut, error) {
|
|||
// Returns an error if parameters are set incorrectly.
|
||||
// Context is required and must not be nil. It is used for network communication.
|
||||
func (c *Client) ObjectPutInit(ctx context.Context, prm PrmObjectPutInit) (*ObjectWriter, error) {
|
||||
// check parameters
|
||||
if ctx == nil {
|
||||
return nil, errorMissingContext
|
||||
}
|
||||
|
||||
var w ObjectWriter
|
||||
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue