mirror of
https://github.com/ivanizag/izapple2.git
synced 2024-11-20 00:32:05 +00:00
25 lines
481 B
Go
25 lines
481 B
Go
// To generate the resources put the files on a "files" subdirectory and run "go run generate.go"
|
|
|
|
package main
|
|
|
|
import (
|
|
"log"
|
|
"net/http"
|
|
"os"
|
|
"path/filepath"
|
|
|
|
"github.com/shurcooL/vfsgen"
|
|
)
|
|
|
|
func main() {
|
|
var cwd, _ = os.Getwd()
|
|
templates := http.Dir(filepath.Join(cwd, "files"))
|
|
if err := vfsgen.Generate(templates, vfsgen.Options{
|
|
Filename: "../romdumps_vfsdata.go",
|
|
PackageName: "romdumps",
|
|
VariableName: "Assets",
|
|
}); err != nil {
|
|
log.Fatalln(err)
|
|
}
|
|
}
|