Documentation ¶
Index ¶
- func ConfirmationPrompt(action string) bool
- func DeleteFromSlice(slice []string, index int) []string
- func ExtractCredentialsFromAuthorizationHeader(authorizationHeader string) (string, string, error)
- func ExtractUsernameFromAuthorizationHeader(authorizationHeader string) (string, error)
- func ReadPassword() (string, error)
- func ReadUsername() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfirmationPrompt ¶
ConfirmationPrompt is a utility function, used to prompt the user for confirmation on potentially dangerous commands. Returns true if the user types yes and false if they don't.
func DeleteFromSlice ¶
DeleteFromSlice is a utility function to remove an object from a slice at the provided index.
func ExtractCredentialsFromAuthorizationHeader ¶
ExtractCredentialsFromAuthorizationHeader takes a Basic Authorization header and decodes it to return the username and passowrd
func ExtractUsernameFromAuthorizationHeader ¶
ExtractUsernameFromAuthorizationHeader takes a Basic Authorization header and decodes it to return the username
func ReadPassword ¶
ReadPassword is a utility function, used to read passwords securely from the terminal.
func ReadUsername ¶
ReadUsername is a utility function, used to read usernames from the terminal.
Types ¶
This section is empty.