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