aboutsummaryrefslogtreecommitdiff
path: root/cmd/receivepack9418/errpkt.go
blob: 743811aa5b1bfebb5a8caaa21667bacbc11b11cb (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package main

import (
	"io"

	"codeberg.org/lindenii/furgit/network/protocol/pktline"
)

func writeErrPkt(w io.Writer, message string) {
	payload := []byte("ERR " + message + "\n")

	frame, err := pktline.AppendData(nil, payload)
	if err != nil {
		return
	}

	_, _ = w.Write(frame)
}