package common
import "github.com/coreos/rkt/tools/common"
Index ¶
- func Die(format string, values ...interface{})
- func MapFilesToDirectories(files, dirs []string) []string
- func MustAbs(dir string) string
- func Warn(format string, values ...interface{})
- type StringSliceWrapper
Functions ¶
func Die ¶
func Die(format string, values ...interface{})
Die is the same as Warn, but it quits with exit status 1 after printing a message.
func MapFilesToDirectories ¶
MapFilesToDirectories creates one entry for each file and directory passed. Result is a kind of cross-product. For files f1 and f2 and directories d1 and d2, the returned list will contain d1/f1 d2/f1 d1/f2 d2/f2.
The "files" part might be a bit misleading - you can pass a list of symlinks or directories there as well.
func MustAbs ¶
MustAbs returns an absolute path. It works like filepath.Abs, but panics if it fails.
func Warn ¶
func Warn(format string, values ...interface{})
Warn is just a shorter version of a formatted printing to stderr. It appends a newline for you.
Types ¶
type StringSliceWrapper ¶
type StringSliceWrapper struct { Slice *[]string }
StringSliceWrapper is an implementation of flag.Value interface. It is basically a proxy that appends strings to an already existing strings slice.
func (*StringSliceWrapper) Set ¶
func (wrapper *StringSliceWrapper) Set(str string) error
func (*StringSliceWrapper) String ¶
func (wrapper *StringSliceWrapper) String() string
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
tools/common/filelist |
- Version
- v1.30.0 (latest)
- Published
- Apr 13, 2018
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 12 hours ago –
Tools for package owners.