Using a more appropriate name for the Address

This commit is contained in:
Apfel 2019-02-12 06:59:48 +01:00
parent f72c94ede9
commit 143f7debd8
3 changed files with 11 additions and 9 deletions

View File

@ -1,8 +1,8 @@
<Config> <Config>
<Address>127.0.0.1:8080</Address>
<SQLUser>uwu</SQLUser> <SQLUser>uwu</SQLUser>
<SQLPass>owo</SQLPass> <SQLPass>owo</SQLPass>
<SQLDB>wiisoap</SQLDB> <SQLDB>wiisoap</SQLDB>
<SQLPort>127.0.0.1:3306</SQLPort> <SQLPort>127.0.0.1:3306</SQLPort>
<Port>127.0.0.1:8080</Port>
<!-- Please use an address for the port. Failing to do so will cause oddities to occur with WiiSOAP. -->
</Config> </Config>

View File

@ -70,9 +70,9 @@ func main() {
CheckError(err) CheckError(err)
// Start the HTTP server. // 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 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. // From here on out, all special cool things should go into the handler function.
} }

View File

@ -27,10 +27,12 @@ import "encoding/xml"
// Config - WiiSOAP Configuration data. // Config - WiiSOAP Configuration data.
type Config struct { type Config struct {
XMLName xml.Name `xml:"Config"` XMLName xml.Name `xml:"Config"`
Address string `xml:"Address"`
SQLUser string `xml:"SQLUser"` SQLUser string `xml:"SQLUser"`
SQLPass string `xml:"SQLPass"` SQLPass string `xml:"SQLPass"`
SQLPort string `xml:"SQLPort"` SQLPort string `xml:"SQLPort"`
Port string `xml:"Port"`
SQLDB string `xml:"SQLDB"` SQLDB string `xml:"SQLDB"`
} }