5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-12-23 11:05:40 +00:00

Minor tweaks

This commit is contained in:
Neil Alexander 2018-05-20 23:25:07 +01:00
parent aae570de2a
commit 79131bb959
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -249,7 +249,7 @@ func (a *admin) handleRequest(conn net.Conn) {
// Decode the input
if err := decoder.Decode(&recv); err != nil {
fmt.Println("Admin socket JSON decode error:", err)
// fmt.Println("Admin socket JSON decode error:", err)
return
}
@ -272,6 +272,7 @@ func (a *admin) handleRequest(conn net.Conn) {
// Check if the field is missing
if _, ok := recv[arg]; !ok {
send = admin_info{
"status": "error",
"error": "Expected field missing",
"expecting": arg,
}
@ -300,7 +301,7 @@ func (a *admin) handleRequest(conn net.Conn) {
// Send the response back
if err := encoder.Encode(&send); err != nil {
fmt.Println("Admin socket JSON encode error:", err)
// fmt.Println("Admin socket JSON encode error:", err)
return
}