func executeDir() string {
ex, err := os.Executable()
if err != nil {
panic(err)
}
exPath := filepath.Dir(ex)
fmt.Println(exPath)
return exPath
}
func getwd() string {
// using the function
mydir, err := os.Getwd()
if err != nil {
fmt.Println(err)
}
fmt.Println(mydir)
return mydir
}
Directory