Documentation ¶
Overview ¶
Package netrc contains functionality to work with netrc.
Index ¶
Constants ¶
View Source
const Filename = netrcFilename
Filename exposes the netrc filename based on the current operating system.
Variables ¶
This section is empty.
Functions ¶
func DeleteMachineForName ¶ added in v0.46.0
func DeleteMachineForName(envContainer app.EnvContainer, name string) (bool, error)
DeleteMachineForName deletes the Machine for the given name, if set.
Returns false if there was no Machine for the given name.
func GetFilePath ¶ added in v0.46.0
func GetFilePath(envContainer app.EnvContainer) (string, error)
GetFilePath gets the netrc file path for the given environment.
func PutMachines ¶ added in v0.46.0
func PutMachines(envContainer app.EnvContainer, machines ...Machine) error
PutMachines adds the given Machines to the configured netrc file.
Types ¶
type Machine ¶
type Machine interface { // Empty for default machine. Name() string Login() string Password() string Account() string }
Machine is a machine.
func GetMachineForName ¶
func GetMachineForName(envContainer app.EnvContainer, name string) (_ Machine, retErr error)
GetMachineForName returns the Machine for the given name.
Returns nil if no such Machine.
Click to show internal directories.
Click to hide internal directories.