github.com/sandwich-go/boost@v1.3.29/xdebug/internal/export.go (about)

     1  package main
     2  
     3  import (
     4  	"github.com/sandwich-go/boost/internal/log"
     5  	"github.com/sandwich-go/boost/misc/xtemplate"
     6  	"github.com/sandwich-go/boost/xdebug/internal/template2"
     7  )
     8  
     9  func main() {
    10  	for _, src := range []struct {
    11  		Name     string
    12  		FileName string
    13  		TPL      string
    14  		Args     interface{}
    15  	}{
    16  		{Name: "dependency", FileName: "./../gen_dependency.go", TPL: template2.DependencyTPL, Args: template2.GetDependencyTPLArgs()},
    17  	} {
    18  		_, err := xtemplate.Execute(src.TPL, src.Args,
    19  			xtemplate.WithOptionName(src.Name),
    20  			xtemplate.WithOptionFileName(src.FileName),
    21  		)
    22  		if err != nil {
    23  			log.Fatal(err.Error())
    24  		}
    25  	}
    26  }