multiformats / go-multistream

an implementation of the multistream protocol in go
MIT License
40 stars 27 forks source link

release v0.4.0 #93

Closed marten-seemann closed 1 year ago

marten-seemann commented 1 year ago

Rebased on top of master, so we can release #95.

github-actions[bot] commented 1 year ago

Suggested version: v0.4.0 Comparing to: v0.3.3 (diff)

Changes in go.mod file(s):

diff --git a/go.mod b/go.mod
index 10f9b11..ae42922 100644
--- a/go.mod
+++ b/go.mod
@@ -1,5 +1,5 @@
 module github.com/multiformats/go-multistream

-go 1.17
+go 1.18

 require github.com/multiformats/go-varint v0.0.6

gorelease says:

# github.com/multiformats/go-multistream
## incompatible changes
(*MultistreamMuxer).AddHandler: changed from func(string, func(protocol string, rwc io.ReadWriteCloser) error) to func(T, HandlerFunc[T])
(*MultistreamMuxer).AddHandlerWithFunc: changed from func(string, func(string) bool, func(protocol string, rwc io.ReadWriteCloser) error) to func(T, func(T) bool, HandlerFunc[T])
(*MultistreamMuxer).Negotiate: changed from func(io.ReadWriteCloser) (string, func(protocol string, rwc io.ReadWriteCloser) error, error) to func(io.ReadWriteCloser) (T, HandlerFunc[T], error)
(*MultistreamMuxer).NegotiateLazy: removed
(*MultistreamMuxer).Protocols: changed from func() []string to func() []T
(*MultistreamMuxer).RemoveHandler: changed from func(string) to func(T)
ErrNotSupported: changed from var to type
Handler.AddName: changed from string to T
Handler.Handle: changed from func(string, io.ReadWriteCloser) error to HandlerFunc[T]
Handler.MatchFunc: changed from func(string) bool to func(T) bool
HandlerFunc: changed from func(string, io.ReadWriteCloser) error to HandlerFunc[T StringLike]
NewMSSelect: changed from func(io.ReadWriteCloser, string) LazyConn to func(io.ReadWriteCloser, T) LazyConn
NewMultistream: changed from func(io.ReadWriteCloser, string) LazyConn to func(io.ReadWriteCloser, T) LazyConn
NewMultistreamMuxer: changed from func() *MultistreamMuxer to func() *MultistreamMuxer[T]
ReadNextToken: changed from func(io.Reader) (string, error) to func(io.Reader) (T, error)
SelectOneOf: changed from func([]string, io.ReadWriteCloser) (string, error) to func([]T, io.ReadWriteCloser) (T, error)
SelectProtoOrFail: changed from func(string, io.ReadWriteCloser) error to func(T, io.ReadWriteCloser) error
SelectWithSimopenOrFail: changed from func([]string, io.ReadWriteCloser) (string, bool, error) to func([]T, io.ReadWriteCloser) (T, bool, error)
## compatible changes
StringLike: added

# summary
Suggested version: v0.4.0

gocompat says:

(empty)