util

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2018 License: BSD-3-Clause Imports: 9 Imported by: 0

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

func GoBin() string

func Rootfs

func Rootfs()

build the root file system.

func Usage

func Usage(cmd string)

Types

type Creator

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

type Dev

type Dev struct {
	Name string
	Mode uint32
	Dev  int
}

func (Dev) Create

func (d Dev) Create() error

func (Dev) String

func (d Dev) String() string

type Dir

type Dir struct {
	Name string
	Mode os.FileMode
}

func (Dir) Create

func (d Dir) Create() error

func (Dir) String

func (d Dir) String() string

type File

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

func (File) Create

func (f File) Create() error

func (File) String

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

func (Link) Create

func (s Link) Create() error

func (Link) String

func (s Link) String() string

type Mount

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

func (Mount) Create

func (m Mount) Create() error

func (Mount) String

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

func (Symlink) Create

func (s Symlink) Create() error

func (Symlink) String

func (s Symlink) String() string

Jump to

Keyboard shortcuts

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