mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
376 B
24 lines
376 B
package cmd
|
|
|
|
import (
|
|
"bytes"
|
|
"fmt"
|
|
"os"
|
|
"text/template"
|
|
)
|
|
|
|
func executeTemplate(tmplStr string, data interface{}) ([]byte, error) {
|
|
tmpl, err := template.New("").Parse(tmplStr)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
buf := new(bytes.Buffer)
|
|
err = tmpl.Execute(buf, data)
|
|
return buf.Bytes(), err
|
|
}
|
|
|
|
func er(msg interface{}) {
|
|
fmt.Println("Error:", msg)
|
|
os.Exit(1)
|
|
}
|
|
|