arns-lt-gemini/text_server.go

19 lines
278 B
Go
Raw Normal View History

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
}