INNER CODE UNIT · Go
without
Bharath-code/git-scope · cmd/git-scope/main.go:204
func without(args []string, flag string) []string {
out := args[:0:0]
for _, a := range args {
if a != flag {
out = append(out, a)
}
}
return out
}
// expandDirs converts relative paths and ~ to absolute paths
func expandDirs(dirs []string) []string {
result := make([]string, 0, len(dirs))
for _, d := range dirs {
if d == "." {
if cwd, err := os.Getwd(); err == nil {
result = append(result, cwd)
}