diff --git a/examples/embed-directive/embed-directive.go b/examples/embed-directive/embed-directive.go index bd3a976..3cbbb0e 100644 --- a/examples/embed-directive/embed-directive.go +++ b/examples/embed-directive/embed-directive.go @@ -1,7 +1,8 @@ -// `//go:embed` is a compiler directive that allows programs to include -// arbitrary files/folders in the binary at build time. Read more about go -// directives [here](https://pkg.go.dev/cmd/compile#hdr-Compiler_Directives) -// and about the embed directive [here](https://pkg.go.dev/embed). +// `//go:embed` is a [compiler +// directive](https://pkg.go.dev/cmd/compile#hdr-Compiler_Directives) that +// allows programs to include arbitrary files and folders in the Go binary at +// build time. Read more about the embed directive +// [here](https://pkg.go.dev/embed). package main // Import the `embed` package; if you don't use any exported @@ -10,9 +11,9 @@ import ( "embed" ) -// embed directives accept paths relative to the directory containing the -// Go source file. This directive embeds the contents of the file into a -// `string` variable. +// `embed` directives accept paths relative to the directory containing the +// Go source file. This directive embeds the contents of the file into the +// `string` variable immediately following it. //go:embed folder/single_file.txt var fileString string diff --git a/examples/embed-directive/embed-directive.hash b/examples/embed-directive/embed-directive.hash index 170913f..da30d5a 100644 --- a/examples/embed-directive/embed-directive.hash +++ b/examples/embed-directive/embed-directive.hash @@ -1,2 +1,2 @@ -82ad92029645b4fd1b5ef0cd9df3fecdf0a6764e -myu7kywm7oI +53a5e68182be7308ddb35cc209e6b905c5b9c713 +p6JB_5z1IBJ diff --git a/public/embed-directive b/public/embed-directive index 2743d7d..4735bc6 100644 --- a/public/embed-directive +++ b/public/embed-directive @@ -27,14 +27,15 @@ -

//go:embed is a compiler directive that allows programs to include -arbitrary files/folders in the binary at build time. Read more about go -directives here -and about the embed directive here.

+

//go:embed is a compiler +directive that +allows programs to include arbitrary files and folders in the Go binary at +build time. Read more about the embed directive +here.

- +
 package main
 
@@ -59,9 +60,9 @@ identifiers from this package, you can do a blank import with _ "embe -

embed directives accept paths relative to the directory containing the -Go source file. This directive embeds the contents of the file into a -string variable.

+

embed directives accept paths relative to the directory containing the +Go source file. This directive embeds the contents of the file into the +string variable immediately following it.

@@ -117,7 +118,7 @@ implements a simple virtual file system.

-

Print out contents of single_file.txt.

+

Print out the contents of single_file.txt.