INNER CODE UNIT · Go
getSmartDefaults
Bharath-code/git-scope · cmd/git-scope/main.go:238
func getSmartDefaults() []string {
home, err := os.UserHomeDir()
if err != nil {
cwd, _ := os.Getwd()
return []string{cwd}
}
// Common developer directories to check
candidates := []string{
filepath.Join(home, "code"),
filepath.Join(home, "Code"),
filepath.Join(home, "projects"),
filepath.Join(home, "Projects"),
filepath.Join(home, "dev"),
filepath.Join(home, "Dev"),
filepath.Join(home, "work"),
filepath.Join(home, "Work"),
filepath.Join(home, "repos"),