Documentation ¶
Overview ¶
Provides an API to access an operating system's keychain securely.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Credentials ¶
Gets the username and password for the given hostname e.g. "example.com"
Example ¶
// Get credentials HOSTNAME := "bitbucket.org" acct, pw, err := keychain.Credentials(HOSTNAME) handle(err, "Failed to get credentials for "+HOSTNAME) // Prepare HTTP request to router req, err := http.NewRequest("GET", PAGE, nil) handle(err, "Failed to create new request to "+PAGE) req.SetBasicAuth(acct, pw) resp, err := http.DefaultClient.Do(req)
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.