// Creates the package with files in it
Creates the package with files in it
// Creates the package with files in it
func createNewApp(appName string) error {
	sep := string(filepath.Separator)
	createFolder(appName)
	files := filesList{
		{
			anchor:    "gitignore",
			fileName:  fmt.Sprintf("%s%s.gitignore", appName, sep),
			template:  GitIgnoreFile{},
			okMessage: "[Log]: Creating \".gitignore\" file",
		},
		{
			anchor:    "main",
			fileName:  fmt.Sprintf("%s%s%s.go", appName, sep, appName),
			template:  MainFile{appName},
			okMessage: fmt.Sprintf("[Log]: Creating \"%s.go\" file", appName),
		},
	}
	err := files.Process()
	if err != nil {
		return err
	}
	return nil
}
func createNewApp ( appName string ) error { sep := string ( filepath . Separator ) createFolder ( appName ) files := filesList { { anchor : " " , fileName : fmt . Sprintf ( " " , appName , sep ) , template : GitIgnoreFile { } , okMessage : " \" \" " , } , { anchor : " " , fileName : fmt . Sprintf ( " " , appName , sep , appName ) , template : MainFile { appName } , okMessage : fmt . Sprintf ( " \" \" " , appName ) , } , } err := files . Process ( ) if err != nil { return err } return nil }
Creates the package with files in it
Creates the package with files in it
// Creates the project's folder // Init files // currentYear, currentMonth, currentDay := time.Now().Date() // currentDate := fmt.Sprintf("%d-%d-%d", currentYear, currentMonth, currentDay) // user, _ := user.Current()