cmd/mbf: handle flags in serve

This enables easier expansion of the protocol.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-04-17 20:12:34 +09:00
parent 3942272c30
commit dd6a480a21
2 changed files with 23 additions and 20 deletions

View File

@@ -3,7 +3,6 @@ package main
import (
"bytes"
"context"
"encoding/binary"
"errors"
"io"
"log"
@@ -46,11 +45,7 @@ func TestNoReply(t *testing.T) {
}
}()
if _, _err := client.Write(
binary.LittleEndian.AppendUint64(nil, remoteNoReply),
); _err != nil {
panic(_err)
} else if _err = c.EncodeAll(
if _err := c.EncodeAll(
client,
pkg.NewFile("check", []byte{0}),
); _err != nil {
@@ -60,7 +55,7 @@ func TestNoReply(t *testing.T) {
}
}()
a, cureErr := cureFromIR(t.Context(), c, server)
a, cureErr := cureFromIR(c, server, remoteNoReply)
if cureErr != nil {
t.Fatalf("cureFromIR: error = %v", cureErr)
}