<pre class="notranslate">What steps will reproduce the problem?

gob.Register(errors.New("")) returns gob: type errors.errorString has no
exported fields

Please provide any additional information below.

<a href="https://groups.google.com/forum/?fromgroups#" rel="nofollow">https://groups.google.com/forum/?fromgroups#</a>!topic/golang-dev/Cua1Av1J8Nc</pre>
<p dir="auto">Errors created by the errors package are not registered with <code class="notranslate">encoding/gob</code> which is necessary in order to send them as results of remote procedure calls.</p>
<p dir="auto">By now, returning an error from the standard library  through an RPC method will cause that the receiver get an <code class="notranslate">EOF error</code> and the transmitter a <code class="notranslate">gob: type not registered for interface: errors.errorString</code></p>
<p dir="auto">My proposal is add an <code class="notranslate">init()</code> function in the errors package to register the struct <code class="notranslate">errorString</code> so then,  developers will avoid create its own errors implementation when using RPCs.</p>