go-data-transfer icon indicating copy to clipboard operation
go-data-transfer copied to clipboard

LastVoucherResult panics if there are no vouchers

Open whyrusleeping opened this issue 4 years ago • 0 comments

Calling LastVoucherResult is unsafe, as it will panic if there are not any voucher results. To check if there are voucher results, you have to check the length of the voucher results array, at which point you might as well just grab the last one from there. This method seems unusable as is

whyrusleeping avatar Mar 16 '21 19:03 whyrusleeping