From 5e142897387e91d98062c89c8fd1e43f8db7a5f6 Mon Sep 17 00:00:00 2001 From: CornierKhan1 Date: Sat, 10 Nov 2018 13:59:53 +1100 Subject: [PATCH] *pulls SQL card* --- config.xml | 4 ++-- core.go | 2 +- main.go | 5 +++-- structure.go | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/config.xml b/config.xml index 2f7fda7..9976a76 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ - + uwu owo nou - \ No newline at end of file + \ No newline at end of file diff --git a/core.go b/core.go index 49dacbe..0ae5ba5 100644 --- a/core.go +++ b/core.go @@ -8,7 +8,7 @@ import ( func StartSQL() { db, err := sql.Open("mysql", - "opensoap:@tcp(127.0.0.1:3306)/hello") + ":"+"@tcp(127.0.0.1:3306)/hello") if err != nil { log.Fatal(err) } diff --git a/main.go b/main.go index 4e07f34..e44724b 100644 --- a/main.go +++ b/main.go @@ -52,8 +52,9 @@ func main() { CheckError(err) ioconfig, err := ioutil.ReadAll(configfile) CheckError(err) - err = xml.Unmarshal(ioconfig, &Config{}) - fmt.Println(Config{}) + Config := Config{} + err = xml.Unmarshal([]byte(ioconfig), &Config) + fmt.Println(Config) CheckError(err) fmt.Println("Initializing core...") diff --git a/structure.go b/structure.go index 87951d7..0d8670d 100644 --- a/structure.go +++ b/structure.go @@ -25,7 +25,7 @@ import "encoding/xml" // The structures may seem repetitive and redundant, but blame WSC's inconsistent SOAP requests. type Config struct { - XMLName xml.Name `xml:"SOAP-GO-WSC_Config"` + XMLName xml.Name `xml:"Config"` SQLUser string `xml:"SQLUser"` SQLPass string `xml:"SQLPass"` Port string `xml:"Port"`