diff options
Diffstat (limited to 'weed/shell')
| -rw-r--r-- | weed/shell/command_collection_list.go | 4 | ||||
| -rw-r--r-- | weed/shell/command_volume_list.go | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/weed/shell/command_collection_list.go b/weed/shell/command_collection_list.go index 0797e56fb..0db74ef20 100644 --- a/weed/shell/command_collection_list.go +++ b/weed/shell/command_collection_list.go @@ -25,8 +25,8 @@ func (c *commandCollectionList) Help() string { func (c *commandCollectionList) Do(args []string, commandEnv *commandEnv, writer io.Writer) (err error) { var resp *master_pb.CollectionListResponse - - err = commandEnv.masterClient.WithClient(context.Background(), func(ctx context.Context, client master_pb.SeaweedClient) error { + ctx := context.Background() + err = commandEnv.masterClient.WithClient(ctx, func(client master_pb.SeaweedClient) error { resp, err = client.CollectionList(ctx, &master_pb.CollectionListRequest{}) return err }) diff --git a/weed/shell/command_volume_list.go b/weed/shell/command_volume_list.go index 52ac4865a..5be5be569 100644 --- a/weed/shell/command_volume_list.go +++ b/weed/shell/command_volume_list.go @@ -25,7 +25,8 @@ func (c *commandVolumeList) Help() string { func (c *commandVolumeList) Do(args []string, commandEnv *commandEnv, writer io.Writer) (err error) { var resp *master_pb.VolumeListResponse - err = commandEnv.masterClient.WithClient(context.Background(), func(ctx context.Context, client master_pb.SeaweedClient) error { + ctx := context.Background() + err = commandEnv.masterClient.WithClient(ctx, func(client master_pb.SeaweedClient) error { resp, err = client.VolumeList(ctx, &master_pb.VolumeListRequest{}) return err }) |
