remove extra console spam

This commit is contained in:
Iris Lightshard 2024-12-05 21:08:11 -07:00
parent d61c786ffd
commit 03ee058fe7
Signed by: Iris Lightshard
GPG key ID: 688407174966CAF3
2 changed files with 3 additions and 5 deletions

View file

@ -135,9 +135,10 @@ func (self *anonAPAdapter) Init(data *chan models.SocketData, server, protocol,
func getBodyJson(res *http.Response) []byte { func getBodyJson(res *http.Response) []byte {
l := res.ContentLength 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 { if l < 0 {
l = 9999999 l = 4096
} }
jsonData := make([]byte, l) jsonData := make([]byte, l)
res.Body.Read(jsonData) res.Body.Read(jsonData)

View file

@ -125,7 +125,6 @@ func (self *HonkAdapter) gethonks(filter string, target *string) {
return return
} }
default: default:
fmt.Println("bout to get honks")
honkForm := url.Values{ honkForm := url.Values{
"action": []string{"gethonks"}, "action": []string{"gethonks"},
"token": []string{self.token}, "token": []string{self.token},
@ -140,7 +139,6 @@ func (self *HonkAdapter) gethonks(filter string, target *string) {
self.stop <- true self.stop <- true
return return
} }
fmt.Println("we got some honks")
hr := honkResponse{} hr := honkResponse{}
err = json.NewDecoder(res.Body).Decode(&hr) err = json.NewDecoder(res.Body).Decode(&hr)
if err != nil { if err != nil {
@ -153,7 +151,6 @@ func (self *HonkAdapter) gethonks(filter string, target *string) {
self.maxId = h.ID self.maxId = h.ID
} }
msg := self.toMsg(h, target) msg := self.toMsg(h, target)
fmt.Println("gonna send a honk on the channel dawg")
self.send(msg) self.send(msg)
} }
time.Sleep(5 * time.Second) time.Sleep(5 * time.Second)