neuralinkcorp / tsui

An (experimental) elegant TUI for configuring Tailscale.
https://neuralink.com/tsui
MIT License
261 stars 4 forks source link

hardened ipn.State enum #16

Closed nikolaydubina closed 2 months ago

nikolaydubina commented 2 months ago

Why?

Other

Tests

(why I think it works as expected? you don't marshal this field from struct directly. you getting it from the context as string. that's the only entrypoint I can see. typechecker also shows no other usage. thus validating through constructor over there is only place we need to track).

nikolaydubina commented 2 months ago

cc: @kognise please check! give it a try!

kognise commented 2 months ago

tyvm! this is definitely clearly better and the only reason for not doing this upfront was laziness :)