remove sonic from the default build, guard it under "sonic" tag for now.

This commit is contained in:
fiatjaf
2025-03-10 17:33:32 -03:00
parent 74e121075e
commit 657c6edf6c
4 changed files with 69 additions and 4 deletions

View File

@ -26,7 +26,12 @@ var (
UnknownLabel = errors.New("unknown envelope label")
)
// ParseMessage parses a message into an Envelope.
type MessageParser interface {
// ParseMessage parses a message into an Envelope.
ParseMessage([]byte) (Envelope, error)
}
// Deprecated: use NewMessageParser instead
func ParseMessage(message []byte) Envelope {
firstComma := bytes.Index(message, []byte{','})
if firstComma == -1 {