github.com/divyam234/rclone@v1.64.1/cmd/serve/dlna/data/assets_generate.go (about)

     1  //go:generate go run assets_generate.go
     2  // The "go:generate" directive compiles static assets by running assets_generate.go
     3  //go:build ignore
     4  // +build ignore
     5  
     6  package main
     7  
     8  import (
     9  	"log"
    10  	"net/http"
    11  
    12  	"github.com/shurcooL/vfsgen"
    13  )
    14  
    15  func main() {
    16  	var AssetDir http.FileSystem = http.Dir("./static")
    17  	err := vfsgen.Generate(AssetDir, vfsgen.Options{
    18  		PackageName:  "data",
    19  		BuildTags:    "!dev",
    20  		VariableName: "Assets",
    21  	})
    22  	if err != nil {
    23  		log.Fatalln(err)
    24  	}
    25  }