// Create will create a folder structure at destination with templates resolved
Create will create a folder structure at destination with templates resolved
// Create will create a folder structure at destination with templates resolved
func Create(destDir, modName, summonerName string, force bool) error {
	box := packr.New("Summon scaffold template", "../templates/scaffold")
	s, err := summon.New(box)
	if err != nil {
		return err
	}
	empty, err := isEmptyDir(destDir)
	if !force && !empty || err != nil {
		if err == nil || !os.IsNotExist(err) {
			return fmt.Errorf("destination directory is not empty")
		}
	}
	_, err = s.Summon(
		summon.All(true),
		summon.JSON(fmt.Sprintf(scaffoldParams, modName, summonerName)),
		summon.Dest(destDir),
	)
	return err
}
func Create ( destDir , modName , summonerName string , force bool ) error { box := packr . New ( " " , " " ) s , err := summon . New ( box ) if err != nil { return err } empty , err := isEmptyDir ( destDir ) if ! force && ! empty || err != nil { if err == nil || ! os . IsNotExist ( err ) { return fmt . Errorf ( " " ) } } _ , err = s . Summon ( summon . All ( true ) , summon . JSON ( fmt . Sprintf ( scaffoldParams , modName , summonerName ) ) , summon . Dest ( destDir ) , ) return err }
Create will create a folder structure at destination with templates resolved
Create will create a folder structure at destination with templates resolved