Documentation ¶
Index ¶
- Constants
- Variables
- func Append(dest, source map[string]interface{}, override bool)
- func AsDataMap(source interface{}) data.Map
- func AsExtractable(input interface{}) (string, map[string]interface{})
- func AsPayload(data []byte) string
- func CheckCommandNotFound(stdout ...string) bool
- func CheckNoSuchFileOrDirectory(stdout ...string) bool
- func Decode(ownerURL, URI string, result interface{}) error
- func DecodeMap(ownerURL, URI string, result map[string]interface{}) error
- func EscapeStdout(stdout string) string
- func EscapedContains(stdout, match string) bool
- func ExtractColumn(line string, columnIndex int) (string, bool)
- func ExtractColumns(line string) ([]string, bool)
- func FromPayload(payload string) ([]byte, error)
- func GetCredential(name, username, password string) (string, error)
- func GetDummyCredential() (string, error)
- func GetUsername(service *secret.Service, credentials string) (string, error)
- func NormalizeMap(keyValuePairs interface{}, deep bool) (map[string]interface{}, error)
- func SetNonEmpty(ptr1, ptr2 *string)
- func SetNonZero(ptr1, ptr2 *int)
Constants ¶
View Source
const CanNotOpen = "can't open"
View Source
const CommandNotFound = "command not found"
View Source
const ErrorIsNotRecoverable = "Error is not recoverable"
View Source
const NoSuchFileOrDirectory = "no such file or directory"
View Source
const NotInstalled = "not installed"
View Source
const ProgramCanBeFound = "can be found in the following packages"
Variables ¶
View Source
var StdErrors = []string{CommandNotFound, NoSuchFileOrDirectory, ProgramCanBeFound}
Functions ¶
func AsExtractable ¶
AsExtractable returns text and data structure
func CheckCommandNotFound ¶
CheckCommandNotFound checks for command not found message in the provided stdout.
func CheckNoSuchFileOrDirectory ¶
CheckNoSuchFileOrDirectory checks for no such file or directory message in the provided stdout.
func EscapeStdout ¶
func EscapedContains ¶
func ExtractColumn ¶
ExtractColumn extract a column from the line for provided index
func ExtractColumns ¶
ExtractColumns extract all column from the line
func GetCredential ¶
func GetDummyCredential ¶
func NormalizeMap ¶
NormalizeMap normalizes keyValuePairs from map or slice (map with preserved key order)
func SetNonEmpty ¶ added in v0.8.0
func SetNonEmpty(ptr1, ptr2 *string)
func SetNonZero ¶ added in v0.8.0
func SetNonZero(ptr1, ptr2 *int)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.