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
|
@ -57,10 +57,7 @@ func (x ResContainerGet) Container() container.Container {
|
|||
// - global (see Client docs);
|
||||
// - *apistatus.ContainerNotFound.
|
||||
func (c *Client) ContainerGet(ctx context.Context, prm PrmContainerGet) (*ResContainerGet, error) {
|
||||
switch {
|
||||
case ctx == nil:
|
||||
return nil, errorMissingContext
|
||||
case !prm.idSet:
|
||||
if !prm.idSet {
|
||||
return nil, errorMissingContainer
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue