Refactor: 统一配置类

This commit is contained in:
2026-04-13 14:36:54 +08:00
parent c11dfe985f
commit 37df78e5d2
4 changed files with 133 additions and 60 deletions
+17 -4
View File
@@ -1,7 +1,20 @@
package neo4j
import "testing"
import (
"testing"
func TestDoConnect(t *testing.T){
doConnect()
}
"knowledge-graph-backend/config"
)
func TestDoConnect(t *testing.T) {
cnf, err := config.Load()
if err != nil {
t.Errorf("[cnf]: %v", err)
}
cfg := config.Neo4jConfig{
URI: cnf.Neo4j.URI,
Username: cnf.Neo4j.Username,
Password: cnf.Neo4j.Password,
}
DoConnect(cfg)
}