mirror of https://github.com/tailscale/tailscale/
feature/condlite/expvar: add expvar stub package when metrics not needed
Saves ~53 KB from the min build. Updates #12614 Change-Id: I73f9544a9feea06027c6ebdd222d712ada851299 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>pull/17473/head
parent
192f8d2804
commit
059f53e67a
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
//go:build !(ts_omit_debug && ts_omit_clientmetrics && ts_omit_usermetrics)
|
||||||
|
|
||||||
|
// Package expvar contains type aliases for expvar types, to allow conditionally
|
||||||
|
// excluding the package from builds.
|
||||||
|
package expvar
|
||||||
|
|
||||||
|
import "expvar"
|
||||||
|
|
||||||
|
type Int = expvar.Int
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
//go:build ts_omit_debug && ts_omit_clientmetrics && ts_omit_usermetrics
|
||||||
|
|
||||||
|
// excluding the package from builds.
|
||||||
|
package expvar
|
||||||
|
|
||||||
|
type Int int64
|
||||||
|
|
||||||
|
func (*Int) Add(int64) {}
|
||||||
Loading…
Reference in New Issue