import ( "embed" "fmt" "io/ioutil" ) //go:embed * var fs embed.FS func main() { files, _ := fs.ReadDir(".") for _, file := range files { fmt.Println("File name: ", file.Name()) fileContent, _ := fs.Open(file.Name()) content, _ := ioutil.ReadAll(fileContent) fmt.Println("File content:\n", string(content)) } }