diff options
author | Emile <hanemile@protonmail.com> | 2019-02-13 13:09:54 +0100 |
---|---|---|
committer | Emile <hanemile@protonmail.com> | 2019-02-13 13:09:54 +0100 |
commit | bbed0542a975bdb1a67aadabea7a54b580fcbd08 (patch) | |
tree | 2b845c617d069726433d540f97ae82a72dcfa594 /main.go | |
parent | ee709e790d5866b3f5d5ef70b015729c522e63a6 (diff) |
moved the db_actions to an own package and adjusted the functions so that the database gets reached into the function for usage
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main.go b/main.go index 07fbc36..cca88a0 100644 --- a/main.go +++ b/main.go @@ -19,6 +19,7 @@ package main import ( "database/sql" "fmt" + "git.darknebu.la/GalaxySimulator/db-container/db_actions" "git.darknebu.la/GalaxySimulator/structs" "log" "net/http" @@ -197,7 +198,7 @@ func main() { //router.HandleFunc("/export/{treeindex}", exportHandler).Methods("POST") //router.HandleFunc("/nrofgalaxies", nrofgalaxiesHandler).Methods("GET") - db = connectToDB() + db = db_actions.ConnectToDB() db.SetMaxOpenConns(75) fmt.Println("Database Container up on port 8081") |