1package export23import (4 "os"5 "os/exec"6)78func min(a int64, b int64) int64 {9 if a > b {10 return b11 } else {12 return a13 }14}1516func GetDir() (string, error) {17 cmd := exec.Command("git", "rev-parse", "--git-dir")18 cmd.Stderr = os.Stderr1920 dir, err := cmd.Output()21 if err != nil {22 return "", err23 }2425 // Strip terminating newline26 dir = dir[:len(dir)-1]2728 return string(dir), nil29}