Compare commits

..

No commits in common. "cde545b144f84d9bc54395eb8c5022dd43fe1a42" and "480da5084b43ba519673592cdb96151f359c1e30" have entirely different histories.

2 changed files with 8 additions and 10 deletions

View file

@ -5,7 +5,7 @@ This is a fork from [james4k/rcon](https://github.com/james4k/rcon) with the sup
## Usage ## Usage
```golang ```golang
// Establish a connection. // Espablish a connection.
remoteConsole, err := rcon.Dial("127.0.0.1", "password") remoteConsole, err := rcon.Dial("127.0.0.1", "password")
if err != nil { if err != nil {
fmt.Println(err) fmt.Println(err)
@ -30,10 +30,10 @@ fmt.Println(response)
``` ```
## License ## License
This lib is licensed under the [MIT License](LICENSE). This lib is licesed under the [MIT License](LICENSE)
## Contributors ## Contributors
If you should encounter a bug or a missing feature don't hesitate to open an issue or even submit a pull-request. If you should encaunter a bug or a missing feature dont hessitate to open an issue or even submit a pull-request.
Special thx to [nhh](https://github.com/nhh) and [dnltinney](https://github.com/dnltinney) for the great help debugging this lib. Special thx to [nhh](https://github.com/nhh) and [dnltinney](https://github.com/dnltinney) for the great help debugging this lib.

View file

@ -7,8 +7,6 @@ import (
"testing" "testing"
) )
const password = "password"
func startTestServer(fn func(net.Conn, *bytes.Buffer)) (string, error) { func startTestServer(fn func(net.Conn, *bytes.Buffer)) (string, error) {
listener, err := net.Listen("tcp", "127.0.0.1:0") listener, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil { if err != nil {
@ -38,7 +36,7 @@ func startTestServer(fn func(net.Conn, *bytes.Buffer)) (string, error) {
if err != nil { if err != nil {
return return
} }
if string(str[:len(str)-1]) != password { if string(str[:len(str)-1]) != "blerg" {
requestID = -1 requestID = -1
} }
@ -98,7 +96,7 @@ func TestAuth(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
rc, err := Dial(addr, password) rc, err := Dial(addr, "blerg")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
@ -120,7 +118,7 @@ func TestMultipacket(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
rc, err := Dial(addr, password) rc, err := Dial(addr, "blerg")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
@ -146,7 +144,7 @@ func TestMultipacket(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
rc, err := Dial(addr, password) rc, err := Dial(addr, "blerg")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
@ -174,7 +172,7 @@ func TestMultipacket(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
rc, err := Dial(addr, password) rc, err := Dial(addr, "blerg")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }