From d5e152faf31648b203d0cdbf6cfae6d81dfb22db Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Fri, 15 Aug 2025 12:41:29 +0200 Subject: [PATCH] reorg struct + doc --- net.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/net.go b/net.go index 8f45eff..177b626 100644 --- a/net.go +++ b/net.go @@ -25,6 +25,12 @@ import ( "os" ) +// Contains a raw json response, not marshalled yet. +type RawResponse struct { + PayloadType int + Payload []byte +} + // Connect to unix domain ipc socket. func (ipc *I3ipc) Connect() error { if !fileExists(ipc.SocketFile) { @@ -75,11 +81,6 @@ func (ipc *I3ipc) sendPayload(payload []byte) error { return nil } -type RawResponse struct { - PayloadType int - Payload []byte -} - func (ipc *I3ipc) readResponse() (*RawResponse, error) { // read header buf := make([]byte, IPC_HEADER_SIZE)