platform

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package platform handles platform-specific operations around clipboards.

Package platform handles stdin processing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfirmYesNoPrompt

func ConfirmYesNoPrompt(prompt string) (bool, error)

ConfirmYesNoPrompt will ask a yes/no question.

func GetUserInputPassword

func GetUserInputPassword(interactive bool) ([]byte, error)

GetUserInputPassword will read the user's input from stdin via multiple means.

func IsInputFromPipe

func IsInputFromPipe() bool

IsInputFromPipe will indicate if connected to stdin pipe.

func PathExists

func PathExists(file string) bool

PathExists indicates whether a path exists (true) or not (false)

func ReadInteractivePassword

func ReadInteractivePassword() (string, error)

ReadInteractivePassword will prompt for a single password for unlocking

func Stdin

func Stdin(one bool) (string, error)

Stdin will get one (or more) lines of stdin as a string.

Types

type Clipboard

type Clipboard struct {
	MaxTime int
	// contains filtered or unexported fields
}

Clipboard represent system clipboard operations.

func NewClipboard

func NewClipboard() (Clipboard, error)

NewClipboard will retrieve the commands to use for clipboard operations.

func (Clipboard) Args

func (c Clipboard) Args(copying bool) (string, []string, bool)

Args returns clipboard args for execution.

func (Clipboard) CopyTo

func (c Clipboard) CopyTo(value string) error

CopyTo will copy to clipboard, if non-empty will clear later.

Jump to

Keyboard shortcuts

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