From 03ee058fe780db38f35d766f83bfb61f72177db0 Mon Sep 17 00:00:00 2001 From: Iris Lightshard Date: Thu, 5 Dec 2024 21:08:11 -0700 Subject: [PATCH] remove extra console spam --- adapter/anonAp.go | 5 +++-- adapter/honk.go | 3 --- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/adapter/anonAp.go b/adapter/anonAp.go index eea2e23..c6a76ec 100644 --- a/adapter/anonAp.go +++ b/adapter/anonAp.go @@ -135,9 +135,10 @@ func (self *anonAPAdapter) Init(data *chan models.SocketData, server, protocol, func getBodyJson(res *http.Response) []byte { l := res.ContentLength - // 4k is a reasonable max size if we get unknown length right? + // if the length is unknown, we'll allocate 4k + // really we should be using Decoders all around if l < 0 { - l = 9999999 + l = 4096 } jsonData := make([]byte, l) res.Body.Read(jsonData) diff --git a/adapter/honk.go b/adapter/honk.go index d2d731a..d07af4f 100644 --- a/adapter/honk.go +++ b/adapter/honk.go @@ -125,7 +125,6 @@ func (self *HonkAdapter) gethonks(filter string, target *string) { return } default: - fmt.Println("bout to get honks") honkForm := url.Values{ "action": []string{"gethonks"}, "token": []string{self.token}, @@ -140,7 +139,6 @@ func (self *HonkAdapter) gethonks(filter string, target *string) { self.stop <- true return } - fmt.Println("we got some honks") hr := honkResponse{} err = json.NewDecoder(res.Body).Decode(&hr) if err != nil { @@ -153,7 +151,6 @@ func (self *HonkAdapter) gethonks(filter string, target *string) { self.maxId = h.ID } msg := self.toMsg(h, target) - fmt.Println("gonna send a honk on the channel dawg") self.send(msg) } time.Sleep(5 * time.Second)