4 ms·
You're right and OP mentioned it at the start too. I guess your editor would show you what is expected there and that should be good enough for most cases. If
by xaduha 4y ago
You're right and OP mentioned it at the start too. I guess your editor would show you what is expected there and that should be good enough for most cases.
If it is some sort of a library though, then there should be a better way to do this that to pass some enums as parameters to functions. But yes, it is a shortcoming that Go should probably fix.
- goodoldneon 4y agoThis type of thing has been surprising to me as I've learned Go. It seems like Go makes a great effort around safety in a lot of ways, but sometimes will avoid safety and say "just be careful" instead