19 lines
278 B
Go
19 lines
278 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"bufio"
|
||
|
"fmt"
|
||
|
"net"
|
||
|
)
|
||
|
|
||
|
func GetSummery() string {
|
||
|
conn, err := net.Dial("tcp", "127.0.0.1:8001")
|
||
|
if err != nil {
|
||
|
panic(err.Error())
|
||
|
}
|
||
|
fmt.Fprintf(conn, "\n")
|
||
|
message, err := bufio.NewReader(conn).ReadString('\n')
|
||
|
conn.Close()
|
||
|
return message
|
||
|
}
|