cmd/omitsize: add flag to disable the removal table
And remove a bogus omit feature from feature/featuretags. Updates #12614 Change-Id: I0a08183fb75c73ae75b6fd4216d134e352dcf5a0 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
0cc1b2ff76
commit
7d2101f352
@@ -4,7 +4,37 @@
|
||||
// The featuretags package is a registry of all the ts_omit-able build tags.
|
||||
package featuretags
|
||||
|
||||
var Features = map[string]string{
|
||||
// CLI is a special feature in the [Features] map that works opposite
|
||||
// from the others: it is opt-in, rather than opt-out, having a different
|
||||
// build tag format.
|
||||
const CLI FeatureTag = "cli"
|
||||
|
||||
// FeatureTag names a Tailscale feature that can be selectively added or removed
|
||||
// via build tags.
|
||||
type FeatureTag string
|
||||
|
||||
// IsOmittable reports whether this feature tag is one that can be
|
||||
// omitted via a ts_omit_ build tag.
|
||||
func (ft FeatureTag) IsOmittable() bool {
|
||||
switch ft {
|
||||
case CLI:
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// OmitTag returns the ts_omit_ build tag for this feature tag.
|
||||
// It panics if the feature tag is not omitable.
|
||||
func (ft FeatureTag) OmitTag() string {
|
||||
if !ft.IsOmittable() {
|
||||
panic("not omitable: " + string(ft))
|
||||
}
|
||||
return "ts_omit_" + string(ft)
|
||||
}
|
||||
|
||||
// Features are the known Tailscale features that can be selectively included or
|
||||
// excluded via build tags, and a description of each.
|
||||
var Features = map[FeatureTag]string{
|
||||
"aws": "AWS integration",
|
||||
"bird": "Bird BGP integration",
|
||||
"capture": "Packet capture",
|
||||
@@ -21,7 +51,6 @@ var Features = map[string]string{
|
||||
"taildrop": "Taildrop (file sending) support",
|
||||
"tailnetlock": "Tailnet Lock support",
|
||||
"tap": "Experimental Layer 2 (ethernet) support",
|
||||
"tka": "Tailnet Lock (TKA) support",
|
||||
"tpm": "TPM support",
|
||||
"wakeonlan": "Wake-on-LAN support",
|
||||
"webclient": "Web client support",
|
||||
|
||||
Reference in New Issue
Block a user