Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPublicIp ¶
Returns the public IP of the machine running the program.
Makes an external call.
Example:
() -> ("123.456.789.012", nil)
func MaskIp ¶
Formats the IP address with the given mask.
Example:
("192.168.1.1", 24) -> "192.168.1.1/24"
func ReadIpFromFile ¶
Reads the first IP address from a file.
Example:
("path/to/file_with_an_ip_address.txt") -> "192.168.1.1"
Assuming the file contains a valid IP address.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.