gitee.com/quant1x/gox@v1.21.2/api/embed_test.go (about) 1 package api 2 3 import ( 4 "embed" 5 "fmt" 6 "testing" 7 ) 8 9 //go:embed * 10 var resources embed.FS 11 12 func TestEmbed(t *testing.T) { 13 filename := "embed.go" 14 file, err := OpenEmbed(resources, filename) 15 fmt.Println(file, err) 16 17 target := "embed1.go" 18 err1 := Export(resources, filename, target) 19 fmt.Println(err1) 20 }