mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-28 05:00:08 +00:00
ipn/ipnlocal, engine: avoid runtime/pprof with two usages of ts_omit_debug
Saves 258 KB. Updates #12614 Change-Id: I37c2f7f916480e3534883f338de4c64d08f7ef2b Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
f7afb9b6ca
commit
5b09913d64
@@ -1,7 +1,7 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
//go:build !js
|
||||
//go:build !js && !ts_omit_debug
|
||||
|
||||
package wgengine
|
||||
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
//go:build js
|
||||
|
||||
package wgengine
|
||||
|
||||
import "tailscale.com/net/dns/resolver"
|
||||
|
||||
type watchdogEngine struct {
|
||||
Engine
|
||||
wrap Engine
|
||||
}
|
||||
|
||||
func (e *watchdogEngine) GetResolver() (r *resolver.Resolver, ok bool) {
|
||||
return nil, false
|
||||
}
|
||||
8
wgengine/watchdog_omit.go
Normal file
8
wgengine/watchdog_omit.go
Normal file
@@ -0,0 +1,8 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
//go:build js || ts_omit_debug
|
||||
|
||||
package wgengine
|
||||
|
||||
func NewWatchdog(e Engine) Engine { return e }
|
||||
Reference in New Issue
Block a user