chore: mongodb unit test

This commit is contained in:
deepzz0
2021-04-27 10:21:27 +08:00
parent e2df642a46
commit bb40570053
5 changed files with 372 additions and 133 deletions

View File

@@ -136,9 +136,9 @@ type Config struct {
func init() {
// compatibility linux and windows
var err error
WorkDir, err = os.Getwd()
if err != nil {
panic(err)
if gopath := os.Getenv("GOPATH"); gopath != "" {
WorkDir = filepath.Join(gopath, "src", "github.com",
"eiblog", "eiblog")
}
path := filepath.Join(WorkDir, "conf", "app.yml")