refactoring function parameter

This commit is contained in:
Chris Lu committed 2019-03-19 23:01:23 -07:00
1 parent 5ae4b963a4
commit 88ab932f7d
4 files changed
+7 -6

No files matched your search

+2 -1
View File
@@ -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
})