refactoring function parameter

This commit is contained in:
Chris Lu
2019-03-19 23:01:23 -07:00
parent 5ae4b963a4
commit 88ab932f7d
4 changed files with 7 additions and 6 deletions

View File

@@ -117,8 +117,8 @@ func withMasterClient(ctx context.Context, master string, grpcDialOption grpc.Di
return fn(ctx, client)
}
func (mc *MasterClient) WithClient(ctx context.Context, fn func(ctx context.Context, client master_pb.SeaweedClient) error) error {
func (mc *MasterClient) WithClient(ctx context.Context, fn func(client master_pb.SeaweedClient) error) error {
return withMasterClient(ctx, mc.currentMaster, mc.grpcDialOption, func(ctx context.Context, client master_pb.SeaweedClient) error {
return fn(ctx, client)
return fn(client)
})
}