{"modulePath":"github.com/carsonfeng/ZCode","version":"v1.1.8","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package util\n\n## Functions\n\n```go\nfunc GetTemplateByBytes(name string, data map[string]interface{}) ([]byte, error)\n```\nGetTemplateByBytes returns the parsed template as a byte.\n\n```go\nfunc GetTemplateByString(name string, data map[string]interface{}) (string, error)\n```\nGetTemplateByString returns the parsed template as a string.\n\n```go\nfunc IsCommandAvailable(cmd string) bool\n```\nIsCommandAvailable checks whether a command is available in the PATH.\n\n```go\nfunc LoadTemplates(files embed.FS) error\n```\nLoadTemplates loads all the templates found in the templates directory.\n\n```go\nfunc NewTemplateByString(format string, data map[string]interface{}) (string, error)\n```\n\n## Types\n\n```go\ntype Data map[string]interface{}\n```\nData defines a custom type for the template data.\n\n```go\nfunc ConvertToMap(args []string) Data\n```\nConvertToMap converts a slice of strings to a map.\n\n","path":"github.com/carsonfeng/ZCode/util","name":"util","synopsis":"","isRedistributable":true}
