utilities

package
v2.46.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckEncryption

func CheckEncryption(IO *iostreams.IOStreams, cfg *config.Config, client *c8y.Client) error

func ClearEnvironmentVariables

func ClearEnvironmentVariables(variables []string, shell ShellType)

ClearEnvironmentVariables clears all the session related environment variables by passing a shell snippet to execute via source or eval.

func ClearProcessEnvironment added in v2.42.0

func ClearProcessEnvironment(variables []string)

func GetCommandLineArgs

func GetCommandLineArgs() string

func GetFileContentType

func GetFileContentType(out *os.File) (string, error)

GetFileContentType TODO: Fix mime detection because it currently returns only application/octet-stream

func WriteShellVariables added in v2.42.0

func WriteShellVariables(w io.Writer, cfg map[string]interface{}, shell ShellType)

Types

type ShellType

type ShellType int
const (
	// ShellBash bash
	ShellBash ShellType = iota

	// ShellZSH zsh
	ShellZSH

	// ShellPowerShell PowerShell
	ShellPowerShell

	// ShellFish fish
	ShellFish
)

func (ShellType) FromString

func (t ShellType) FromString(name string) ShellType

func (ShellType) Parse added in v2.42.0

func (t ShellType) Parse(name string) (ShellType, bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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