Reassigning an error from a different package may lead to bugs as the modified error is reflected globally (i.e., across the program).
package main
import (
"io"
)
func foo() {
io.EOF = nil
}
package main
import (
"io"
)
func foo() {
// Do not reassign the error
}