ioutils

package
v1.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 12 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src, dst string, fileMode os.FileMode) error

func DoubleWinPathSeparator

func DoubleWinPathSeparator(filePath string) string

func PromptStrings added in v1.4.0

func PromptStrings(items []PromptItem, label string, onSelect func(PromptItem)) error

Prompt strings by selecting from list until "Save and continue" is selected. Usage example: 🐸 Save and continue JFrog Artifactory URL (http://localhost:8080/artifactory/) JFrog Distribution URL () JFrog Xray URL () JFrog Mission Control URL () JFrog Pipelines URL ()

func ReadCredentialsFromConsole

func ReadCredentialsFromConsole(details, savedDetails coreutils.Credentials, disallowUsingSavedPassword bool) error

disallowUsingSavedPassword - Prevent changing username or url without changing the password. False iff the user changed the username or the url.

func ScanFromConsole

func ScanFromConsole(caption string, scanInto *string, defaultValue string)

func ScanPasswordFromConsole added in v1.9.0

func ScanPasswordFromConsole(message string) (string, error)

func SelectString added in v1.5.0

func SelectString(items []PromptItem, label string, onSelect func(PromptItem)) error

func UnixToWinPathSeparator

func UnixToWinPathSeparator(filePath string) string

func WinToUnixPathSeparator

func WinToUnixPathSeparator(filePath string) string

Types

type PromptItem added in v1.4.0

type PromptItem struct {
	// The option string to show, i.e - JFrog Artifactory URL.
	Option string
	// The variable to set.
	TargetValue *string
	// Default value to show. If empty string is entered, use the default value.
	DefaultValue string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL