17 lines
223 B
Go
17 lines
223 B
Go
package common
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
)
|
|
|
|
func RuntimeBaseDir() string {
|
|
exe, err := os.Executable()
|
|
if err == nil {
|
|
return filepath.Dir(exe)
|
|
}
|
|
return "."
|
|
}
|
|
|
|
func RootDir() string { return RuntimeBaseDir() }
|