mirror of
https://github.com/sourcegraph/jsonrpc2.git
synced 2026-08-17 02:28:13 +02:00
go: upgrade to Go 1.26.4 and run go fix ./...
This commit is contained in:
parent
28070556df
commit
7293e9715b
15 changed files with 57 additions and 64 deletions
|
|
@ -21,12 +21,12 @@ func NewObjectStream(conn *ws.Conn) ObjectStream {
|
|||
}
|
||||
|
||||
// WriteObject implements jsonrpc2.ObjectStream.
|
||||
func (t ObjectStream) WriteObject(obj interface{}) error {
|
||||
func (t ObjectStream) WriteObject(obj any) error {
|
||||
return t.conn.WriteJSON(obj)
|
||||
}
|
||||
|
||||
// ReadObject implements jsonrpc2.ObjectStream.
|
||||
func (t ObjectStream) ReadObject(v interface{}) error {
|
||||
func (t ObjectStream) ReadObject(v any) error {
|
||||
err := t.conn.ReadJSON(v)
|
||||
if e, ok := err.(*ws.CloseError); ok {
|
||||
if e.Code == ws.CloseAbnormalClosure && e.Text == io.ErrUnexpectedEOF.Error() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue