*pulls SQL card*

This commit is contained in:
CornierKhan1 2018-11-10 13:59:53 +11:00
parent 5e12c06b51
commit 5e14289738
4 changed files with 7 additions and 6 deletions

View File

@ -1,5 +1,5 @@
<SOAP-GO-WSC_Config>
<Config>
<SQLUser>uwu</SQLUser>
<SQLPass>owo</SQLPass>
<Port>nou</Port>
</SOAP-GO-WSC_Config>
</Config>

View File

@ -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)
}

View File

@ -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...")

View File

@ -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"`