chat package will not ignore the translate message now, but return the row msg.

This commit is contained in:
Tnze
2019-08-07 15:23:25 +08:00
parent 72ba5b7345
commit 73af09e2ea
8 changed files with 54 additions and 39 deletions

View File

@ -0,0 +1,32 @@
package yggdrasil
import (
"encoding/json"
"fmt"
"testing"
)
func TestEncodingPayload(t *testing.T) {
j, err := json.Marshal(AuthPayload{
Agent: Agent{
Name: "Minecraft",
Version: 1,
},
UserName: "mojang account name",
Password: "mojang account password",
ClientToken: "client identifier",
RequestUser: true,
})
if err != nil {
t.Fatal(err)
}
t.Log(string(j))
}
func ExampleAuthenticate() {
resp, err := Authenticate("", "")
if err != nil {
panic(err)
}
fmt.Println(resp)
}