package collage import ( "embed" "fmt" "io/fs" "testing" ) //go:embed test_data/* var testData embed.FS func TestMake(t *testing.T) { t.Log("Test was run") ifs, err := fs.Sub(testData, "test_data") if err != nil { t.Fatalf("getting test_data subdir failed %v", err) } img1f, err := ifs.Open("img1.jpg") if err != nil { t.Fatalf("opening image failed %v", err) } fmt.Printf("%#v\n", img1f) }