From ba135488b4e885bc8618113b0d4db727e162182b Mon Sep 17 00:00:00 2001 From: Viktor Liu Date: Tue, 3 Dec 2024 13:24:01 +0100 Subject: [PATCH] Remove unused fn from merge --- client/server/debug.go | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/client/server/debug.go b/client/server/debug.go index bf997fe92..c12fd99db 100644 --- a/client/server/debug.go +++ b/client/server/debug.go @@ -419,26 +419,6 @@ func (s *Server) addSingleLogfile(logPath, targetName string, req *proto.DebugBu return nil } -func (s *Server) anonymize(reader io.Reader, writer *io.PipeWriter, anonymizer *anonymize.Anonymizer) { - defer func() { - // always nil - _ = writer.Close() - }() - - scanner := bufio.NewScanner(reader) - for scanner.Scan() { - line := anonymizer.AnonymizeString(scanner.Text()) - if _, err := writer.Write([]byte(line + "\n")); err != nil { - writer.CloseWithError(fmt.Errorf("anonymize write: %w", err)) - return - } - } - if err := scanner.Err(); err != nil { - writer.CloseWithError(fmt.Errorf("anonymize scan: %w", err)) - return - } -} - // getLatestNetworkMap returns the latest network map from the engine if network map persistence is enabled func (s *Server) getLatestNetworkMap() (*mgmProto.NetworkMap, error) { if s.connectClient == nil {