Minor tweaks

Signed-off-by: peterzhu1992 <peterzhu1992@gmail.com>
This commit is contained in:
peterzhu1992 2022-05-17 01:25:01 -04:00
parent f900918c93
commit 7798376aa3
No known key found for this signature in database
GPG Key ID: AE1C56C7D03DDA1C
4 changed files with 9 additions and 9 deletions

View File

@ -1,7 +1,7 @@
// Go supports _embedding_ of structs and interfaces
// to express a more seamless _composition_ of types.
// This is not to be confused with _go:embed_ which is
// a go directive introduced in go version 1.16 to embed
// This is not to be confused with `//go:embed` which is
// a go directive introduced in Go version 1.16+ to embed
// files and folders into the application binary.
package main

View File

@ -1,2 +1,2 @@
8ec60ccaf4c5803bd65a776e05b458b008ae52a7
4B33kwDJ3fm
a246237126303fb110186ac2598bca15d36e8366
TqMui3hJuX7

View File

@ -1,4 +1,4 @@
$ go run embedding.go
$ go run struct-embedding.go
co={num: 1, str: some name}
also num: 1
describe: base with num=1

View File

@ -29,8 +29,8 @@
<td class="docs">
<p>Go supports <em>embedding</em> of structs and interfaces
to express a more seamless <em>composition</em> of types.
This is not to be confused with <em>go:embed</em> which is
a go directive introduced in go version 1.16 to embed
This is not to be confused with <code>//go:embed</code> which is
a go directive introduced in Go version 1.16+ to embed
files and folders into the application binary.</p>
</td>
@ -45,7 +45,7 @@ files and folders into the application binary.</p>
</td>
<td class="code leading">
<a href="http://play.golang.org/p/4B33kwDJ3fm"><img title="Run code" src="play.png" class="run" /></a><img title="Copy code" src="clipboard.png" class="copy" />
<a href="http://play.golang.org/p/TqMui3hJuX7"><img title="Run code" src="play.png" class="run" /></a><img title="Copy code" src="clipboard.png" class="copy" />
<pre class="chroma"><span class="kn">package</span> <span class="nx">main</span>
</pre>
</td>
@ -221,7 +221,7 @@ we see that a <code>container</code> now implements the
</td>
<td class="code">
<pre class="chroma"><span class="gp">$</span> go run embedding.go
<pre class="chroma"><span class="gp">$</span> go run struct-embedding.go
<span class="go">co={num: 1, str: some name}
</span><span class="go">also num: 1
</span><span class="go">describe: base with num=1