func ReplaceContent(repoPath string, config map[string]interface{}) {
	filepath.Walk(repoPath, func(fp string, fi os.FileInfo, err error) error {
		if err != nil {
			fmt.Println(err)  
			return nil        
		}
		if !!fi.IsDir() {
			return nil  
		}
		file, err := ioutil.ReadFile(fp)
		if err != nil {
			fmt.Println(err)
		}
		lines := strings.Split(string(file), "\n")
		for i, line := range lines {
			placeholders := regex.FindAllString(line, -1)
			for _, ph := range placeholders {
				key := getKey(ph)
				value := config[key].(string)
				lines[i] = strings.Replace(lines[i], ph, value, 1)
			}
		}
		output := strings.Join(lines, "\n")
		err = ioutil.WriteFile(fp, []byte(output), 0644)
		if err != nil {
			fmt.Println(err)
		}
		return nil
	})
}
ReplaceContent receives a config map to replace all files with your variables
package main
import (
	"bufio"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"os"
	"path/filepath"
	"regexp"
	"strings"
)
var regex, _ = regexp.Compile("{{(\\s|)cook?\\w+\\.\\w+(\\s|)}}")
func Get(repoName string) string {
	repoURL := "https://github.com/" + repoName + "/archive/master.zip"
	dirName := strings.Split(repoName, "/")[1]
	downloadFromUrl(repoURL)
	unzip("master.zip", "")
	os.Rename(dirName+"-master", dirName)
	return dirName
}
func Parse(repoPath string) map[string]interface{} {
	var configJSON map[string]interface{}
	configNames := [2]string{"cook.json", "cookiecutter.json"}
	for index := range configNames {
		config, err := ioutil.ReadFile(repoPath + string(os.PathSeparator) + configNames[index])
		if err != nil {
			continue
		}
		json.Unmarshal([]byte(config), &configJSON)
	}
	if len(configJSON) == 0 {
		panic("This is not a valid repository.")
	}
	return configJSON
}
func Ask(config map[string]interface{}) map[string]interface{} {
	for k, v := range config {
		reader := bufio.NewReader(os.Stdin)
		fmt.Print("Enter ", k, " (default: ", v, "): ")
		text, _ := reader.ReadString('\n')
		if len(strings.TrimSpace(text)) > 0 {
			text = strings.TrimSuffix(text, "\n")
			config[k] = text
		}
	}
	return config
}
func getKey(placeholder string) string {
	placeholder = regex.FindString(placeholder)
	strParts := strings.Split(placeholder, ".")[1]
	key := strings.Replace(strParts, "}}", "", -1)
	key = strings.TrimSpace(key)
	return key
}
func getPaths(repoPath string) []string {
	var paths = make([]string, 0)
	filepath.Walk(repoPath, func(fp string, fi os.FileInfo, err error) error {
		if err != nil {
			fmt.Println(err)  
			return nil        
		}
		matched := regex.MatchString(fi.Name())
		if matched {
			paths = append(paths, fp)
		}
		return nil
	})
	return paths
}
func ReplacePaths(paths []string, config map[string]interface{}) string {
	var newFolder string
	for i := len(paths) - 1; i >= 0; i-- {
		parts := strings.Split(paths[i], string(os.PathSeparator))
		replacePart := parts[len(parts)-1]
		originalPart := parts[len(parts)-1]
		key := getKey(replacePart)
		value := config[key].(string)
		originalPart = regex.ReplaceAllString(originalPart, value)
		parts[len(parts)-1] = originalPart
		newPath := strings.Join(parts, string(os.PathSeparator))
		os.Rename(paths[i], newPath)
		if i == 0 {
			folderParts := strings.Split(newPath, string(os.PathSeparator))
			oldFolder := folderParts[0]
			newFolder = folderParts[1]
			os.Rename(newPath, newFolder)
			os.RemoveAll(oldFolder)
		}
	}
	return newFolder
}