Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 543 Bytes

README.md

File metadata and controls

36 lines (26 loc) · 543 Bytes

telnetClient

a even easier telnet client for command servers using a resp format like:

  • error: err, <errormsg>
  • success: OK, <resp>[, <otherval>]...

pkg.go.dev

Connect to server:

c, err := telnetClient.NewController("<destination>")
if err != nil {
	fmt.Println(err)
}

Send a command

resp, err := c.Exec("<command>")
if err != nil {
	fmt.Println(err)
}

fmt.Println(resp)

End connection

err := c.Close()
if err != nil {
	fmt.Println(err)
}