INNER CODE UNIT · Go

runInit

Bharath-code/git-scope · cmd/git-scope/main.go:280

func runInit() {
	configPath := config.DefaultConfigPath()

	fmt.Println("git-scope init — Setup your configuration")
	fmt.Println()

	// Check if config already exists
	if config.ConfigExists(configPath) {
		fmt.Printf("Config file already exists at: %s\n", configPath)
		fmt.Print("Overwrite? [y/N]: ")
		reader := bufio.NewReader(os.Stdin)
		answer, _ := reader.ReadString('\n')
		answer = strings.TrimSpace(strings.ToLower(answer))
		if answer != "y" && answer != "yes" {
			fmt.Println("Aborted.")
			return
		}
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…