<p dir="auto">by <strong>axel.schreiner</strong>:</p>
<pre class="notranslate">This is using 'hg update release' on MacOS X Lion (hg update default and ./all.bash fail
early on).

Based on the package documentation I believe that data can be transfered to and from an
interface-typed variable. This does not seem to be the case.

The attached program can be run with the arguments ss is si ii to select a transfer from
and to a struct or an interface. Additionally, the argument reg will register the
structure with gob, but that does not change anything.

What steps will reproduce the problem?
1. compile the attached file
2. run it with options ss and is -- no error message.
3. run it with options si or ii -- error message from gob. 

What is the expected output?

No error message in case 3.

What do you see instead?

decoding error gob: wrong type received for local value main.Mer: Foo = struct { Bar
string; Beque string; }

Which compiler are you using (5g, 6g, 8g, gccgo)?

6g

Which operating system are you using?

MacOS X Lion

Which revision are you using?  (hg identify)

c1702f36df03 (release-branch.r60) release/release.r60.3</pre>
<p dir="auto">Attachments:</p>
<ol dir="auto">
<li><a href="https://storage.googleapis.com/go-attachment/2938/0/demo.go" rel="nofollow">demo.go</a> (1446 bytes)</li>
</ol>
<p dir="auto">The documentation for time.String() shows the format used to convert time into a string: <a href="http://golang.org/pkg/time/#Time.String" rel="nofollow">http://golang.org/pkg/time/#Time.String</a>.</p>
<p dir="auto">This string appears to be different to the const formats already defined in the time package, so if I wanted to naively (not using time.Format) convert a time -&gt; string -&gt; time I'd need to copy the format from the docs into my code and use it in a call to time.Parse.</p>
<p dir="auto">In addition this format string is used a few times in <a href="http://golang.org/src/time/format_test.go" rel="nofollow">http://golang.org/src/time/format_test.go</a> as a literal string.</p>
<p dir="auto">Isn't this format string a good candidate to be placed in the consts?</p>