Simplified config package
This commit is contained in:
parent
b7685fd7ec
commit
3b76919fec
10 changed files with 68 additions and 66 deletions
|
@ -2,7 +2,6 @@ package config
|
|||
|
||||
import (
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"runtime/debug"
|
||||
)
|
||||
|
@ -45,22 +44,3 @@ func init() {
|
|||
findLibrary()
|
||||
}
|
||||
}
|
||||
|
||||
func findLibrary() {
|
||||
dir := WorkingDirectory
|
||||
|
||||
for {
|
||||
Library = path.Join(dir, "lib")
|
||||
stat, err := os.Stat(Library)
|
||||
|
||||
if !os.IsNotExist(err) && stat != nil && stat.IsDir() {
|
||||
return
|
||||
}
|
||||
|
||||
if dir == "/" {
|
||||
panic("standard library not found")
|
||||
}
|
||||
|
||||
dir = filepath.Dir(dir)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue