Versions in this module Expand all Collapse all v0 v0.0.1 Sep 14, 2023 Changes in this version + func AddContentInsideFunction(filePath, functionName, newContent string) error + func AddEnvConfigFromString(newConfig, workDirectory string) error + func AddGoConfigFromString(newConfig, workDirectory string) error + func AskConfirm(question string) (bool, error) + func AskData(question string) (string, error) + func AskDataWithValidation(questionTitle string, validator survey.Validator) (string, error) + func CheckAllGoFilesInDirectory(dirPath string) error + func CheckPackageNameInFile(filePath string, expectedPackageName string) (bool, error) + func CheckSyntaxGoFile(filePath string) (bool, error) + func CheckZipIntegrity(zipPath string) error + func CopyFileOrDirectory(sourcePath string, destPath string) error + func CreateFileFromTemplate(templatePath, finalPath string) error + func CreateFileFromTemplateWithCustomReplace(templatePath, finalPath string, replaces map[string]string) error + func DownloadFile(url string, destPath string) error + func ExtendFile(filePath, newContent string) error + func ExtractImports(code string) []string + func ExtractPackageLine(code string) string + func FileOrDirectoryExists(filePath string) bool + func FunctionExistsInFile(filePath string, functionName string) (bool, error) + func GetDependenciesInstallationOrder(dependencyFilePath string) ([]string, error) + func GetExecutablePath() (string, error) + func GetMD5Hash(data string) string + func GetThisModuleName() (string, error) + func ImportBaseContent(sourcePath, finalPath string) error + func InitGoModules(ApplicationName, basePath string) error + func InstallNeededPackages(basePath string) error + func IsGithubUrl(url string) bool + func IsUrl(url string) bool + func ListDirectories(dirPath string) ([]string, error) + func ListDirectoriesAndFiles(dirPath string) ([]string, error) + func ListFiles(dirPath string) ([]string, error) + func MakeTemporalDirectory() (string, error) + func MoveFileOrDirectory(sourcePath string, destPath string) error + func ParsePromptFile(promptFilePath string, placeholdersToReplace *map[string]string, ...) error + func ReadFile(filePath string) (string, error) + func ReadFileWithCustomReplace(filePath string, replaces map[string]string) (string, error) + func RemovePackageAndImports(code string) string + func SanitizeFileName(input string) string + func SliceContainsElement(slice []string, target string) bool + func TempFileWithDummyPlaceholder(filePath string) (string, error) + func Unzip(src, dest string) error + func ValidateAllDependenciesInstalled(dependsFilePath string) (bool, []string, error) + func ValidateTemplateName(templateName string) error + func ZipDirectoryContent(outputzipfilepath, directoryPath string) error + type MksTemplatePath struct + FileExtension string + FileName string + Folders []string + func ProcessMksCustomFilesPath(fileName string) (MksTemplatePath, error) + type Prompt struct + Default string + ExtendFile string + Placeholder string + Prompt string + Type string + Validate string + type PromptsFileFormat struct + Prompts []Prompt