util

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2019 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src string, dst string) error

func CreateDirectories

func CreateDirectories() error

Creates the /var/lib/firecracker/{vm,image,kernel} directories

func DirExists

func DirExists(dirname string) bool

func ExecForeground

func ExecForeground(command string, args ...string) (int, error)

func ExecuteCommand

func ExecuteCommand(command string, args ...string) (string, error)

func FileExists

func FileExists(filename string) bool

func FileIsEmpty

func FileIsEmpty(file string) (bool, error)

FileIsEmpty returns true if the file is empty

func IsEmptyString

func IsEmptyString(input string) bool

func MatchPrefix

func MatchPrefix(prefix string, fields ...string) []string

func NewMAC

func NewMAC(buffer *[]string) error

Fills the given string slice with unique MAC addresses

func NewOutput

func NewOutput() *output

func PathExists

func PathExists(path string) (bool, os.FileInfo)

func RandomName

func RandomName() string

func TestRoot added in v0.3.0

func TestRoot() (bool, error)

Types

type MountPoint

type MountPoint struct {
	Path string
}

func Mount

func Mount(volume string) (*MountPoint, error)

func (*MountPoint) Umount

func (mp *MountPoint) Umount() error

type Prefixer added in v0.4.0

type Prefixer struct {
	// contains filtered or unexported fields
}

func NewPrefixer added in v0.4.0

func NewPrefixer() *Prefixer

func (*Prefixer) Prefix added in v0.4.0

func (p *Prefixer) Prefix(input ...string) string

Jump to

Keyboard shortcuts

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