summaryrefslogtreecommitdiffhomepage
path: root/control/controlhttp/controlhttpserver
diff options
context:
space:
mode:
authorNick Khyl <nickk@tailscale.com>2025-01-30 11:24:25 -0600
committerNick Khyl <1761190+nickkhyl@users.noreply.github.com>2025-01-30 18:12:54 -0600
commit4e7f4086b2b7ded76e43bdb4ad12d9dd253edba4 (patch)
treef0ed5610742450fc302022b90e7fd65892220893 /control/controlhttp/controlhttpserver
parent7d5fe13d27126b96d81b0c654bd552a19db8a312 (diff)
downloadtailscale-4e7f4086b2b7ded76e43bdb4ad12d9dd253edba4.tar.xz
tailscale-4e7f4086b2b7ded76e43bdb4ad12d9dd253edba4.zip
ipn: generate LoginProfileView and use it instead of *LoginProfile where appropriate
Conventionally, we use views (e.g., ipn.PrefsView, tailcfg.NodeView, etc.) when dealing with structs that shouldn't be mutated. However, ipn.LoginProfile has been an exception so far, with a mix of passing and returning LoginProfile by reference (allowing accidental mutations) and by value (which is wasteful, given its current size of 192 bytes). In this PR, we generate an ipn.LoginProfileView and use it instead of passing/returning LoginProfiles by mutable reference or copying them when passing/returning by value. Now, LoginProfiles can only be mutated by (*profileManager).setProfilePrefs. Updates #14823 Signed-off-by: Nick Khyl <nickk@tailscale.com>
Diffstat (limited to 'control/controlhttp/controlhttpserver')
0 files changed, 0 insertions, 0 deletions