From 896cf1affaebb17e85bd1318c264a2c8b6b405f3 Mon Sep 17 00:00:00 2001 From: Apfel <32610623+Apfel@users.noreply.github.com> Date: Thu, 14 Mar 2019 02:58:14 +0100 Subject: [PATCH] once again, a better name in the config --- config.xml.example | 8 -------- main.go | 2 +- structure.go | 8 ++++---- 3 files changed, 5 insertions(+), 13 deletions(-) delete mode 100644 config.xml.example diff --git a/config.xml.example b/config.xml.example deleted file mode 100644 index a49dfe9..0000000 --- a/config.xml.example +++ /dev/null @@ -1,8 +0,0 @@ - -
127.0.0.1:8080
- - uwu - owo - wiisoap - 127.0.0.1:3306 -
diff --git a/main.go b/main.go index ed86dfa..57a0a41 100644 --- a/main.go +++ b/main.go @@ -62,7 +62,7 @@ func main() { fmt.Println("Initializing core...") // Start SQL. - db, err := sql.Open("mysql", fmt.Sprintf("%s:%s@tcp(%s)/%s)", CON.SQLUser, CON.SQLPass, CON.SQLPort, CON.SQLDB)) + db, err := sql.Open("mysql", fmt.Sprintf("%s:%s@tcp(%s)/%s)", CON.SQLUser, CON.SQLPass, CON.SQLAddress, CON.SQLDB)) CheckError(err) // Close SQL after everything else is done. diff --git a/structure.go b/structure.go index b1da01e..11b416c 100644 --- a/structure.go +++ b/structure.go @@ -30,10 +30,10 @@ type Config struct { Address string `xml:"Address"` - SQLUser string `xml:"SQLUser"` - SQLPass string `xml:"SQLPass"` - SQLPort string `xml:"SQLPort"` - SQLDB string `xml:"SQLDB"` + SQLAddress string `xml:"SQLAddress"` + SQLUser string `xml:"SQLUser"` + SQLPass string `xml:"SQLPass"` + SQLDB string `xml:"SQLDB"` } // CDS - CheckDeviceStatus