23 lines
565 B
Go
23 lines
565 B
Go
package globals
|
|
|
|
// Global variables, Mocks, etc.
|
|
// This package shall not have any dependency towards the application itself!
|
|
import (
|
|
"log"
|
|
"path"
|
|
)
|
|
|
|
func init() {
|
|
user, err := MockUserCurrent()
|
|
if err != nil {
|
|
log.Printf("Current user not obtainable: %s", err)
|
|
log.Fatal("Impossible to open default database")
|
|
}
|
|
|
|
// ConfigDirectoryList Configuration directory list Windows TODO
|
|
ConfigDirectoryList = []string{user.HomeDir /*TODO!!!*/}
|
|
|
|
// ConfigDirectory Configuration directory string Windows
|
|
ConfigDirectory = path.Join(ConfigDirectoryList...)
|
|
}
|