在Go中使用Telnet客户端读取数据

I'm trying to read data from some devices via telnet protocol and below is my simple code. I just want to print some meaningful results.

package main

import (
    "fmt"
    "github.com/reiver/go-telnet"

)

func main() {

    conn, _ := telnet.DialTo("10.253.102.41:23")
    fmt.Println(conn)
}

but this is what I got by this way: &{0xc000006028 0xc000004720 0xc000040640}

It's obvious that it gets you &{0xc000006028 0xc000004720 0xc000040640} cause you are printing the connection object and it's the pointer address of that. If you want to print the data, you have to read it through connection using the Read method of the connection. Something like this:

b := make([]byte, 100)
n, err := conn.Read(b)
if err != nil {
    // handle error
}

fmt.Println(string(b))