Documentation
¶
Index ¶
- func CheckToolIsInstalled(name, versionCommand string) (bool, error)
- func CopyFilesFromEmbedFS(efs embed.FS, files []EmbedFile) error
- func Execute(commands []Command) error
- func GenerateFilesByTemplateFromEmbedFS(efs embed.FS, templates []EmbedTemplate) error
- func GetToolVersion(name, versionCommand string) (string, error)
- func IsExistInFolder(name string, isFolder bool) bool
- func MakeFile(file File) error
- func MakeFiles(files []File) error
- func MakeFolders(names ...string) error
- func MakeStyled(s string, style *StringStyle) string
- func MakeStyledFrame(s string, style *FrameStyle) string
- type Command
- type EmbedFile
- type EmbedTemplate
- type File
- type FrameStyle
- type StringStyle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckToolIsInstalled ¶
CheckToolIsInstalled checks if a tool is installed by executing a command.
It takes the name of the tool and the command to retrieve the version as input. It returns the bool indicating if the tool is installed and any error encountered.
func CopyFilesFromEmbedFS ¶
CopyFilesFromEmbedFS function for copy all files from the embed file system.
func GenerateFilesByTemplateFromEmbedFS ¶
func GenerateFilesByTemplateFromEmbedFS(efs embed.FS, templates []EmbedTemplate) error
GenerateFilesByTemplateFromEmbedFS generates new files from the given template with variables from embed FS.
func GetToolVersion ¶
GetToolVersion gets the version of a tool by executing a command.
It takes the name of the tool and the command to retrieve the version as input. It returns the version as a string and any error encountered.
func IsExistInFolder ¶
IsExistInFolder searches for a file or folder by the given name in the current folder.
func MakeFolders ¶
MakeFolders makes a multiply folders with names.
func MakeStyled ¶
func MakeStyled(s string, style *StringStyle) string
MakeStyled returns a styled string.
func MakeStyledFrame ¶
func MakeStyledFrame(s string, style *FrameStyle) string
MakeStyledFrame returns a styled frame.
Types ¶
type EmbedTemplate ¶
EmbedTemplate represents struct for a one template.
type FrameStyle ¶
type FrameStyle struct { Padding []int Color lipgloss.AdaptiveColor }
FrameStyle represents a styled frame.
type StringStyle ¶
type StringStyle struct { IsBold bool Color lipgloss.AdaptiveColor }
StringStyle represents a styled string.