package main import ( "os" "path/filepath" ) func GetExecDir() string { execPath, err := os.Executable() if err != nil { panic(err) } return filepath.Dir(execPath) }