Adjust for gofmt changes in 1.19
In 1.19, gofmt slightly changes how comments are formatted; a blank `//` is inserted before `//go:embed` directives. To accommodate for that in generate.go, treat empty comment lines as part of docs segments.
This commit is contained in:
@@ -14,16 +14,19 @@ import (
|
||||
// `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
|
||||
|
||||
// Or embed the contents of the file into a `[]byte`.
|
||||
//
|
||||
//go:embed folder/single_file.txt
|
||||
var fileByte []byte
|
||||
|
||||
// We can also embed multiple files or even folders with wildcards. This uses
|
||||
// a variable of the [embed.FS type](https://pkg.go.dev/embed#FS), which
|
||||
// implements a simple virtual file system.
|
||||
//
|
||||
//go:embed folder/single_file.txt
|
||||
//go:embed folder/*.hash
|
||||
var folder embed.FS
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
53a5e68182be7308ddb35cc209e6b905c5b9c713
|
||||
p6JB_5z1IBJ
|
||||
69526bd78ac861c85bb12b96e9f1273e8aecc5a6
|
||||
6m2ll-D52BB
|
||||
|
||||
Reference in New Issue
Block a user