Closed omjogani closed 3 months ago
I think we need to revert this. Asking because I tested the original library and following works there
const id = init({ length: 150 });
console.log(id());
// p0m6ycspza37iwloxpn5zw0nqtbkbcycha5mm6jlqzsu33qrlh84kmkvi41qt2w5khcddvb7a50wsczoy1o795rs75b3ifld3u
So
myFunction(CreateId()) // this won't work
id, err := CreateId() myFunction(id) // only this will work. This is cumbersome and for most cases, not required.
This test case is passing with values currently, It should not allow values [1, >33, 0, -1] . So there needs to have validation in
CreateIdOf
function before returningInit()
or may be inInit()
function at the time of injecting len.