m1k1o / neko

A self hosted virtual browser that runs in docker and uses WebRTC.
https://neko.m1k1o.net/
Apache License 2.0
7.74k stars 569 forks source link

add generic ArrayIn function with minimal type casting #411

Closed eos175 closed 3 months ago

m1k1o commented 3 months ago

Looks good. But probably array could be []T and not any to make things even easier.

eos175 commented 3 months ago

You would need to cast beforehand, which I think is fine. Let me know if I should do it.

image

m1k1o commented 3 months ago

Yeah, it would be better to change types it all the way down, because its just string and it prevents unnecessary panic.

eos175 commented 3 months ago

There can't be a panic because the cast is safe. However, exclude is always []string, so it's better to change it