-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjusted the Telnet connection process to better handle errors and improve safety. The connection is now established within the New() function and returned with proper error state. This mitigates the risk of working with null or improperly closed connections which existed in the earlier approach.
- Loading branch information
1 parent
1ecbf70
commit b8c06b8
Showing
3 changed files
with
33 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,5 @@ const ctrl = "\r\n" | |
type Telnet struct { | ||
user string | ||
pass string | ||
ip string | ||
conn net.Conn | ||
Conn net.Conn | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters