util

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: Apache-2.0 Imports: 11 Imported by: 23

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDetach = errors.New("detached from container")

ErrDetach indicates that an attach session was manually detached by the user.

Functions

func CopyDetachable added in v0.49.0

func CopyDetachable(dst io.Writer, src io.Reader, keys []byte) (written int64, err error)

CopyDetachable is similar to io.Copy but support a detach key sequence to break out.

func GetRuntimeDir

func GetRuntimeDir() (string, error)

GetRuntimeDir returns the runtime directory

func StringInSlice

func StringInSlice(s string, sl []string) bool

StringInSlice determines if a string is in a string slice, returns bool

func StringMatchRegexSlice

func StringMatchRegexSlice(s string, re []string) bool

StringMatchRegexSlice determines if a given string matches one of the given regexes, returns bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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