mirror of
https://github.com/fluffle/goirc
synced 2025-06-07 07:13:20 +00:00
Fix os.EINVAL -> os.ErrInvalid change.
This commit is contained in:
parent
cb5001bb27
commit
dbdc470c5c
1 changed files with 3 additions and 3 deletions
|
@ -99,7 +99,7 @@ func (m *mockNetConn) ExpectNothing() {
|
||||||
// Implement net.Conn interface
|
// Implement net.Conn interface
|
||||||
func (m *mockNetConn) Read(b []byte) (int, error) {
|
func (m *mockNetConn) Read(b []byte) (int, error) {
|
||||||
if m.closed {
|
if m.closed {
|
||||||
return 0, os.EINVAL
|
return 0, os.ErrInvalid
|
||||||
}
|
}
|
||||||
l := 0
|
l := 0
|
||||||
select {
|
select {
|
||||||
|
@ -114,7 +114,7 @@ func (m *mockNetConn) Read(b []byte) (int, error) {
|
||||||
|
|
||||||
func (m *mockNetConn) Write(s []byte) (int, error) {
|
func (m *mockNetConn) Write(s []byte) (int, error) {
|
||||||
if m.closed {
|
if m.closed {
|
||||||
return 0, os.EINVAL
|
return 0, os.ErrInvalid
|
||||||
}
|
}
|
||||||
b := make([]byte, len(s))
|
b := make([]byte, len(s))
|
||||||
copy(b, s)
|
copy(b, s)
|
||||||
|
@ -124,7 +124,7 @@ func (m *mockNetConn) Write(s []byte) (int, error) {
|
||||||
|
|
||||||
func (m *mockNetConn) Close() error {
|
func (m *mockNetConn) Close() error {
|
||||||
if m.closed {
|
if m.closed {
|
||||||
return os.EINVAL
|
return os.ErrInvalid
|
||||||
}
|
}
|
||||||
// Shut down *ALL* the goroutines!
|
// Shut down *ALL* the goroutines!
|
||||||
// This will trigger an EOF event in Read() too
|
// This will trigger an EOF event in Read() too
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue