diff options
| author | Russ Cox <rsc@golang.org> | 2022-02-03 14:12:08 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2022-04-11 16:34:30 +0000 |
| commit | 19309779ac5e2f5a2fd3cbb34421dafb2855ac21 (patch) | |
| tree | 67dfd3e5d96250325e383183f95b6f5fe1968514 /src/embed | |
| parent | 017933163ab6a2b254f0310c61b57db65cded92e (diff) | |
| download | go-19309779ac5e2f5a2fd3cbb34421dafb2855ac21.tar.xz | |
all: gofmt main repo
[This CL is part of a sequence implementing the proposal #51082.
The design doc is at https://go.dev/s/godocfmt-design.]
Run the updated gofmt, which reformats doc comments,
on the main repository. Vendored files are excluded.
For #51082.
Change-Id: I7332f099b60f716295fb34719c98c04eb1a85407
Reviewed-on: https://go-review.googlesource.com/c/go/+/384268
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/embed')
| -rw-r--r-- | src/embed/embed.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/embed/embed.go b/src/embed/embed.go index 9737ccdf6b..cbe2d398fb 100644 --- a/src/embed/embed.go +++ b/src/embed/embed.go @@ -36,7 +36,7 @@ // data, _ := f.ReadFile("hello.txt") // print(string(data)) // -// Directives +// # Directives // // A //go:embed directive above a variable declaration specifies which files to embed, // using one or more path.Match patterns. @@ -96,7 +96,7 @@ // // If any patterns are invalid or have invalid matches, the build will fail. // -// Strings and Bytes +// # Strings and Bytes // // The //go:embed line for a variable of type string or []byte can have only a single pattern, // and that pattern can match only a single file. The string or []byte is initialized with @@ -105,7 +105,7 @@ // The //go:embed directive requires importing "embed", even when using a string or []byte. // In source files that don't refer to embed.FS, use a blank import (import _ "embed"). // -// File Systems +// # File Systems // // For embedding a single file, a variable of type string or []byte is often best. // The FS type enables embedding a tree of files, such as a directory of static @@ -120,12 +120,11 @@ // // template.ParseFS(content, "*.tmpl") // -// Tools +// # Tools // // To support tools that analyze Go packages, the patterns found in //go:embed lines // are available in “go list” output. See the EmbedPatterns, TestEmbedPatterns, // and XTestEmbedPatterns fields in the “go help list” output. -// package embed import ( |
