From 395bdf82b6c293d69ff4bec9485c4e15bfe6b524 Mon Sep 17 00:00:00 2001 From: Dmitri Dolguikh Date: Thu, 9 Jul 2026 18:28:02 +0200 Subject: [PATCH] removed unused code Signed-off-by: Dmitri Dolguikh --- shared/management/networkmap/decode.go | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/shared/management/networkmap/decode.go b/shared/management/networkmap/decode.go index 4ba447a7c..b37ce7bb5 100644 --- a/shared/management/networkmap/decode.go +++ b/shared/management/networkmap/decode.go @@ -483,18 +483,6 @@ func decodeCustomZones(zones []*proto.CustomZone) []nbdns.CustomZone { return out } -// Synthetic ID generators — deterministic given the same wire input. -// Underscore-separated ("p_", "pol_", ...) so they're visually -// distinct in operator logs. fmt.Sprintf would dominate the decode hot path -// on large accounts (a 10k-peer envelope produces ~50k synth calls); the -// strconv.AppendUint builder keeps it allocation-light. -func synthID(prefix string, n uint32) string { - buf := make([]byte, 0, len(prefix)+10) - buf = append(buf, prefix...) - buf = strconv.AppendUint(buf, uint64(n), 10) - return string(buf) -} - func uint32SliceToStrings(ports []uint32) []string { if len(ports) == 0 { return nil @@ -547,13 +535,6 @@ func protocolFromProto(p proto.RuleProtocol) types.PolicyRuleProtocolType { } } -func lookupAgentVersion(table []string, idx uint32) string { - if int(idx) < len(table) { - return table[idx] - } - return "" -} - func stringSliceToSet(s []string) map[string]struct{} { if len(s) == 0 { return nil