util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2018 License: BSD-3-Clause Imports: 9 Imported by: 182

Documentation

Overview

Package util contains various u-root utility functions.

Index

Constants

View Source
const (
	// Not all these paths may be populated or even exist but OTOH they might.
	PATHHEAD = "/ubin"
	PATHMID  = "/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin:/usr/local/sbin"
	PATHTAIL = "/buildbin:/bbin"
)

Variables

View Source
var (
	Env = map[string]string{
		"LD_LIBRARY_PATH": "/usr/local/lib",
		"GOROOT":          "/go",
		"GOPATH":          "/",
		"GOBIN":           "/ubin",
		"CGO_ENABLED":     "0",
	}
)

Functions

func GoBin added in v0.2.0

func GoBin() string

func Rootfs added in v0.2.0

func Rootfs()

build the root file system.

func Usage

func Usage(cmd string)

Types

type Creator added in v0.2.0

type Creator interface {
	Create() error
	fmt.Stringer
}

type Dev added in v0.2.0

type Dev struct {
	Name string
	Mode uint32
	Dev  int
}

func (Dev) Create added in v0.2.0

func (d Dev) Create() error

func (Dev) String added in v0.2.0

func (d Dev) String() string

type Dir added in v0.2.0

type Dir struct {
	Name string
	Mode os.FileMode
}

func (Dir) Create added in v0.2.0

func (d Dir) Create() error

func (Dir) String added in v0.2.0

func (d Dir) String() string

type File added in v0.2.0

type File struct {
	Name     string
	Contents string
	Mode     os.FileMode
}

func (File) Create added in v0.2.0

func (f File) Create() error

func (File) String added in v0.2.0

func (f File) String() string
type Link struct {
	OldPath string
	NewPath string
}

func (Link) Create added in v0.2.0

func (s Link) Create() error

func (Link) String added in v0.2.0

func (s Link) String() string

type Mount added in v0.2.0

type Mount struct {
	Source string
	Target string
	FSType string
	Flags  uintptr
	Opts   string
}

func (Mount) Create added in v0.2.0

func (m Mount) Create() error

func (Mount) String added in v0.2.0

func (m Mount) String() string
type Symlink struct {
	Target  string
	NewPath string
}

func (Symlink) Create added in v0.2.0

func (s Symlink) Create() error

func (Symlink) String added in v0.2.0

func (s Symlink) String() string

Jump to

Keyboard shortcuts

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