From de3cc205498bd7d7e659b9749069ed564f99a589 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Tue, 21 Nov 2023 18:36:05 +0100 Subject: [PATCH] remove unused marshal function Signed-off-by: Kristoffer Dalby --- hscontrol/mapper/mapper.go | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/hscontrol/mapper/mapper.go b/hscontrol/mapper/mapper.go index d49fe6270b..6aa1294da9 100644 --- a/hscontrol/mapper/mapper.go +++ b/hscontrol/mapper/mapper.go @@ -405,25 +405,6 @@ func (m *Mapper) marshalMapResponse( return data, nil } -// MarshalResponse takes an Tailscale Response, marhsal it to JSON. -// If isNoise is set, then the JSON body will be returned -// If !isNoise and privateKey2019 is set, the JSON body will be sealed in a Nacl box. -func MarshalResponse( - resp interface{}, -) ([]byte, error) { - jsonBody, err := json.Marshal(resp) - if err != nil { - log.Error(). - Caller(). - Err(err). - Msg("Cannot marshal response") - - return nil, err - } - - return jsonBody, nil -} - func zstdEncode(in []byte) []byte { encoder, ok := zstdEncoderPool.Get().(*zstd.Encoder) if !ok {