utilities

package
v2.58.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

	// ShellPosixShell sh
	ShellPosixShell
)

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