github.com/goplusjs/gopherjs@v1.2.6-0.20211206034512-f187917453b8/compiler/natives/src/embed/embed.go (about) 1 // +build js 2 // +build go1.16 3 4 package embed 5 6 func buildFS(list []struct { 7 name string 8 data string 9 hash [16]byte 10 }) (f FS) { 11 var files []file 12 for _, v := range list { 13 files = append(files, file{ 14 name: v.name, 15 data: v.data, 16 hash: v.hash, 17 }) 18 } 19 f.files = &files 20 return 21 }