about summary refs log tree commit diff
path: root/main.go
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-02-13 13:09:54 +0100
committerEmile <hanemile@protonmail.com>2019-02-13 13:09:54 +0100
commitbbed0542a975bdb1a67aadabea7a54b580fcbd08 (patch)
tree2b845c617d069726433d540f97ae82a72dcfa594 /main.go
parentee709e790d5866b3f5d5ef70b015729c522e63a6 (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.go3
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")