os

package
v0.0.0-...-dc6f9f8 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ShellBinary = "/bin/sh"

ShellBinary holds the path of the shell command

Variables

This section is empty.

Functions

func GetNewTempDir

func GetNewTempDir() string

Types

type Dir

type Dir struct {
	Name string  `ko:"name=name"`
	Dir  []*Dir  `ko:"name=dir"`
	File []*File `ko:"name=file"`
}

func NewDir

func NewDir(name string) *Dir

func (*Dir) AddFile

func (dir *Dir) AddFile(name, body string)

func (*Dir) Materialize

func (dir *Dir) Materialize(atPath string) error

func (*Dir) Walk

func (dir *Dir) Walk(path []string) *Dir

type File

type File struct {
	Name string `ko:"name=name"`
	Body string `ko:"name=body"`
}

type FileSystem

type FileSystem struct {
	Root *Dir `ko:"name=root"` // local root
}

type GoTask

type GoTask struct {
	Name   string    `ko:"name=name"`
	Binary string    `ko:"name=binary"`
	Arg    []string  `ko:"name=arg"`
	Env    []string  `ko:"name=env"`
	Dir    *string   `ko:"name=dir"`
	After  []*GoTask `ko:"name=after"`
}

GoTask implements the running on an external command.

func (*GoTask) Doc

func (*GoTask) Doc() string

func (*GoTask) Help

func (*GoTask) Help() string

func (*GoTask) Play

func (t *GoTask) Play(ctx *runtime.Context) bool

Play invokes the external command.

func (*GoTask) RunWithOutput

func (t *GoTask) RunWithOutput() (string, error)

RunWithOutput invokes the external command, waits until it is terminated and returns its output.

Jump to

Keyboard shortcuts

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