Last active
May 8, 2025 11:41
-
-
Save faustman/b7213e55a5a53ba32abe3cb365d7fca0 to your computer and use it in GitHub Desktop.
Examine Go embed.FS content
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"embed" | |
"fmt" | |
"io/fs" | |
) | |
//go:embed * | |
var content embed.FS | |
func main() { | |
fs.WalkDir(content, ".", func(path string, d fs.DirEntry, err error) error { | |
fmt.Println(path) | |
return nil | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment