tech: upgraded macaron & macaron inject, binding, session

This commit is contained in:
Torkel Ödegaard
2017-04-25 15:16:32 +02:00
parent 9f462c0519
commit 4720216e5e
39 changed files with 740 additions and 1319 deletions
+3 -3
View File
@@ -64,9 +64,9 @@ func GetSrcPath(importPath string) (appPath string, err error) {
// it returns error when the variable does not exist.
func HomeDir() (home string, err error) {
if runtime.GOOS == "windows" {
home = os.Getenv("HOMEDRIVE") + os.Getenv("HOMEPATH")
if home == "" {
home = os.Getenv("USERPROFILE")
home = os.Getenv("USERPROFILE")
if len(home) == 0 {
home = os.Getenv("HOMEDRIVE") + os.Getenv("HOMEPATH")
}
} else {
home = os.Getenv("HOME")