Documentation ¶
Index ¶
- func CwdToGitRoot() error
- func GetTemplateByBytes(name string, data map[string]interface{}) ([]byte, error)
- func GetTemplateByString(name string, data map[string]interface{}) (string, error)
- func IsBinaryFile(fileName string) bool
- func IsCommandAvailable(cmd string) bool
- func IsDir(dir string) bool
- func IsFile(filePath string) bool
- func LoadTemplates(files embed.FS) error
- func NewTemplateByString(format string, data map[string]interface{}) (string, error)
- func ReadFile(filePath string) (string, error)
- func SplitText(text string, chunkSize int) []string
- type Data
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CwdToGitRoot ¶
func CwdToGitRoot() error
func GetTemplateByBytes ¶
GetTemplateByBytes returns the parsed template as a byte.
func GetTemplateByString ¶
GetTemplateByString returns the parsed template as a string.
func IsBinaryFile ¶
func IsCommandAvailable ¶
IsCommandAvailable checks whether a command is available in the PATH.
func IsDir ¶
IsDir returns true if given path is a directory, or returns false when it's a file or does not exist.
func IsFile ¶
IsFile returns true if given path is a file, or returns false when it's a directory or does not exist.
func LoadTemplates ¶
LoadTemplates loads all the templates found in the templates directory.
func NewTemplateByString ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.