utils

package
v0.0.0-...-3d89408 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIfSliceContains

func CheckIfSliceContains[T comparable](slice []T, ele T) bool

func InsertToSliceByIndex

func InsertToSliceByIndex[T comparable](slice []T, idx int, val T) []T

func MakeOSReleaseLinux

func MakeOSReleaseLinux() map[string]string

func PopFromSliceByIndex

func PopFromSliceByIndex[T comparable](slice []T, idx int) (T, []T)

func RandomHex

func RandomHex(n int) (string, error)

func RenderASCIIGraph

func RenderASCIIGraph(render_target string)

func SliceContains

func SliceContains(s []string, str string) bool

func SplitStrict

func SplitStrict(content string) map[string]string

Types

type ShellConnection

type ShellConnection struct {
	*ssh.Client
	// contains filtered or unexported fields
}

func ShellConnect

func ShellConnect(addr, user, password string) (*ShellConnection, error)

func (*ShellConnection) SendCommands

func (conn *ShellConnection) SendCommands(cmds string) ([]byte, error)

func (*ShellConnection) SendCommandsBackground

func (conn *ShellConnection) SendCommandsBackground(cmds string) ([]byte, error)

Jump to

Keyboard shortcuts

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