ipn/localapi: dead code eliminate unreachable/useless LocalAPI handlers when disabled

Saves ~94 KB from the min build.

Updates #12614

Change-Id: I3b0b8a47f80b9fd3b1038c2834b60afa55bf02c2
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2025-10-07 07:34:29 -07:00
committed by Brad Fitzpatrick
parent a9334576ea
commit 5c1e26b42f
3 changed files with 66 additions and 53 deletions
+3
View File
@@ -381,6 +381,9 @@ func (lc *Client) UserMetrics(ctx context.Context) ([]byte, error) {
//
// IncrementCounter does not support gauge metrics or negative delta values.
func (lc *Client) IncrementCounter(ctx context.Context, name string, delta int) error {
if !buildfeatures.HasClientMetrics {
return nil
}
type metricUpdate struct {
Name string `json:"name"`
Type string `json:"type"`