From 143f7debd8bf8a93d1152f0ea8887962924848c5 Mon Sep 17 00:00:00 2001 From: Apfel <32610623+Apfel@users.noreply.github.com> Date: Tue, 12 Feb 2019 06:59:48 +0100 Subject: [PATCH] Using a more appropriate name for the Address --- config.xml.example | 4 ++-- main.go | 4 ++-- structure.go | 12 +++++++----- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/config.xml.example b/config.xml.example index 68ab120..a49dfe9 100644 --- a/config.xml.example +++ b/config.xml.example @@ -1,8 +1,8 @@ +
127.0.0.1:8080
+ uwu owo wiisoap 127.0.0.1:3306 - 127.0.0.1:8080 -
diff --git a/main.go b/main.go index 2d65d10..e541533 100644 --- a/main.go +++ b/main.go @@ -70,9 +70,9 @@ func main() { CheckError(err) // Start the HTTP server. - fmt.Printf("Starting HTTP connection (%s)...\nNot using the usual port for HTTP? Be sure to use a proxy, otherwise the Wii can't connect!", CON.Port) + fmt.Printf("Starting HTTP connection (%s)...\nNot using the usual port for HTTP? Be sure to use a proxy, otherwise the Wii can't connect!", CON.Address) http.HandleFunc("/", handler) // each request calls handler - log.Fatal(http.ListenAndServe(CON.Port, nil)) + log.Fatal(http.ListenAndServe(CON.Address, nil)) // From here on out, all special cool things should go into the handler function. } diff --git a/structure.go b/structure.go index f554bbb..f4ffd20 100644 --- a/structure.go +++ b/structure.go @@ -27,11 +27,13 @@ import "encoding/xml" // Config - WiiSOAP Configuration data. type Config struct { XMLName xml.Name `xml:"Config"` - SQLUser string `xml:"SQLUser"` - SQLPass string `xml:"SQLPass"` - SQLPort string `xml:"SQLPort"` - Port string `xml:"Port"` - SQLDB string `xml:"SQLDB"` + + Address string `xml:"Address"` + + SQLUser string `xml:"SQLUser"` + SQLPass string `xml:"SQLPass"` + SQLPort string `xml:"SQLPort"` + SQLDB string `xml:"SQLDB"` } // CDS - CheckDeviceStatus