diff --git a/examples.txt b/examples.txt index d83f7f7..1c62e01 100644 --- a/examples.txt +++ b/examples.txt @@ -19,7 +19,7 @@ Strings and Runes Structs Methods Interfaces -Embedding +Struct Embedding Generics Errors Goroutines diff --git a/examples/embedding/embedding.hash b/examples/embedding/embedding.hash deleted file mode 100644 index 4d55e33..0000000 --- a/examples/embedding/embedding.hash +++ /dev/null @@ -1,2 +0,0 @@ -316e334f61f03d59c8a45889a057903a786534ba -k5Z_CnP8DK9 diff --git a/examples/embedding/embedding.go b/examples/struct-embedding/struct-embedding.go similarity index 89% rename from examples/embedding/embedding.go rename to examples/struct-embedding/struct-embedding.go index 6bd021e..856e5de 100644 --- a/examples/embedding/embedding.go +++ b/examples/struct-embedding/struct-embedding.go @@ -1,5 +1,8 @@ // 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 +// files and folders into the application binary. package main diff --git a/examples/struct-embedding/struct-embedding.hash b/examples/struct-embedding/struct-embedding.hash new file mode 100644 index 0000000..3882948 --- /dev/null +++ b/examples/struct-embedding/struct-embedding.hash @@ -0,0 +1,2 @@ +a246237126303fb110186ac2598bca15d36e8366 +TqMui3hJuX7 diff --git a/examples/embedding/embedding.sh b/examples/struct-embedding/struct-embedding.sh similarity index 76% rename from examples/embedding/embedding.sh rename to examples/struct-embedding/struct-embedding.sh index 316095e..02c90b3 100644 --- a/examples/embedding/embedding.sh +++ b/examples/struct-embedding/struct-embedding.sh @@ -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 diff --git a/public/generics b/public/generics index bddca50..2a21093 100644 --- a/public/generics +++ b/public/generics @@ -9,7 +9,7 @@ onkeydown = (e) => { if (e.key == "ArrowLeft") { - window.location.href = 'embedding'; + window.location.href = 'struct-embedding'; } diff --git a/public/index.html b/public/index.html index d4d2647..a0c2e15 100644 --- a/public/index.html +++ b/public/index.html @@ -69,7 +69,7 @@
measure
.
- Next example: Embedding. + Next example: Struct Embedding.
diff --git a/public/embedding b/public/struct-embedding similarity index 94% rename from public/embedding rename to public/struct-embedding index 8ca4b7f..176a974 100644 --- a/public/embedding +++ b/public/struct-embedding @@ -2,7 +2,7 @@ -