mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-07 05:13:23 +00:00
ipn/conffile: don't depend on hujson on iOS/Android
Fixes #13772 Change-Id: I3ae03a5ee48c801f2e5ea12d1e54681df25d4604 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
91f58c5e63
commit
508980603b
20
ipn/conffile/conffile_hujson.go
Normal file
20
ipn/conffile/conffile_hujson.go
Normal file
@@ -0,0 +1,20 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
//go:build !ios && !android
|
||||
|
||||
package conffile
|
||||
|
||||
import "github.com/tailscale/hujson"
|
||||
|
||||
// Only link the hujson package on platforms that use it, to reduce binary size
|
||||
// & memory a bit.
|
||||
//
|
||||
// (iOS and Android don't have config files)
|
||||
|
||||
// While the linker's deadcode mostly handles the hujson package today, this
|
||||
// keeps us honest for the future.
|
||||
|
||||
func init() {
|
||||
hujsonStandardize = hujson.Standardize
|
||||
}
|
||||
Reference in New Issue
Block a user