mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-07-07 14:49:56 +02:00
remove sonic from the default build, guard it under "sonic" tag for now.
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user