system

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewLineChar = "\n"

Functions

func AskForConfirmation

func AskForConfirmation(
	logger interfaces.Logger,
	stdin io.Reader,
	question string,
) (bool, error)

func DefaultSSHConfigFileExists

func DefaultSSHConfigFileExists() bool

func DefaultSSHConfigFilePath

func DefaultSSHConfigFilePath() string

func DefaultSSHDir

func DefaultSSHDir() string

func DefaultSSHDirExists

func DefaultSSHDirExists() bool

func DefaultSSHKnownHostsFileExists

func DefaultSSHKnownHostsFileExists() bool

func DefaultSSHKnownHostsFilePath

func DefaultSSHKnownHostsFilePath() string

func PathExists

func PathExists(path string) bool

func UserConfigDir

func UserConfigDir() string

UserConfigDir returns the path where the user config files should be stored following XDG Base Directory Specification. Ref: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

func UserConfigFilePath

func UserConfigFilePath() string

func UserHomeDir

func UserHomeDir() string

Types

type Browser

type Browser struct{}

func NewBrowser

func NewBrowser() Browser

func (Browser) OpenURL

func (Browser) OpenURL(url string) error

type Displayer

type Displayer struct{}

func NewDisplayer

func NewDisplayer() Displayer

func (Displayer) Display

func (Displayer) Display(w io.Writer, format string, args ...interface{})

type EnvVars

type EnvVars struct{}

func NewEnvVars

func NewEnvVars() EnvVars

func (EnvVars) Get

func (EnvVars) Get(key string) string

type Logger

type Logger struct{}

func NewLogger

func NewLogger() Logger

func (Logger) Error

func (Logger) Error(format string, v ...interface{})

func (Logger) Info

func (Logger) Info(format string, v ...interface{})

func (Logger) Log

func (Logger) Log(format string, v ...interface{})

func (Logger) LogNoNewline

func (Logger) LogNoNewline(format string, v ...interface{})

func (Logger) Warning

func (Logger) Warning(format string, v ...interface{})

func (Logger) Write

func (l Logger) Write(p []byte) (n int, err error)

type Sleeper

type Sleeper struct{}

func NewSleeper

func NewSleeper() Sleeper

func (Sleeper) Sleep

func (Sleeper) Sleep(d time.Duration)

Jump to

Keyboard shortcuts

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