Documentation ¶
Overview ¶
Package netrc implements a parser for netrc file format.
A netrc file usually resides in $HOME/.netrc and is traditionally used by the ftp(1) program to look up login information (username, password, etc.) of remote system(s). The file format is (loosely) described in this man page: http://linux.die.net/man/5/netrc .
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseFile ¶
ParseFile parses the netrc file identified by filename and returns the set of machine information and macros defined in it. The “default” machine, which is intended to be used when no machine name matches, is identified by an empty machine name. There can be only one “default” machine.
If there is a parsing error, an Error is returned.
Types ¶
type Machine ¶
Machine contains information about a remote machine.
func FindMachine ¶
FindMachine parses the netrc file identified by filename and returns the Machine named by name. If no Machine with name name is found, the “default” machine is returned.