(controlURL string)
| 19 | } |
| 20 | |
| 21 | func rpcSetTailscaleControlURL(controlURL string) error { |
| 22 | ensureConfigLoaded() |
| 23 | |
| 24 | previousURL := config.TailscaleControlURL |
| 25 | |
| 26 | normalized, err := tailscale.SetControlURL(controlURL) |
| 27 | if err != nil { |
| 28 | return err |
| 29 | } |
| 30 | |
| 31 | config.TailscaleControlURL = normalized |
| 32 | if err := SaveConfig(); err != nil { |
| 33 | config.TailscaleControlURL = previousURL |
| 34 | return fmt.Errorf("failed to save tailscale control URL: %w", err) |
| 35 | } |
| 36 | |
| 37 | return nil |
| 38 | } |
nothing calls this directly
no test coverage detected