Documentation ¶
Index ¶
- func AppendLoggerPrefix(ctx context.Context, prefix string) context.Context
- func Command(ctx context.Context, path string, args ...string) *exec.Cmd
- func ContextWithEnv(ctx context.Context, env ...string) context.Context
- func Deps(ctx context.Context, functions ...interface{})
- func FromBinDir(pathElems ...string) string
- func FromBuildDir(pathElems ...string) string
- func FromGitRoot(pathElems ...string) string
- func FromSageDir(pathElems ...string) string
- func FromToolsDir(pathElems ...string) string
- func FromWorkDir(pathElems ...string) string
- func GenerateMakefiles(mks ...Makefile)
- func Logger(ctx context.Context) *log.Logger
- func NewLogger(name string) *log.Logger
- func Output(cmd *exec.Cmd) string
- func SerialDeps(ctx context.Context, targets ...interface{})
- func WithLogger(ctx context.Context, logger *log.Logger) context.Context
- type Makefile
- type Namespace
- type Target
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendLoggerPrefix ¶ added in v0.232.0
AppendLoggerPrefix appends a prefix to the current logger.
func Command ¶
Command should be used when returning exec.Cmd from tools to set opinionated standard fields.
func ContextWithEnv ¶ added in v0.94.0
ContextWithEnv returns a context with environment variables which are appended to Command.
func Deps ¶
Deps runs each of the provided functions in parallel.
Dependencies must be of type func(context.Context) error or Target.
Each function will be run exactly once, even across multiple calls to Deps.
func FromBinDir ¶
FromBinDir returns the path relative to where tool binaries are installed. Parent directories of the returned path will be automatically created.
func FromBuildDir ¶ added in v0.64.0
FromBuildDir returns the path relative to where generated build files are installed. Parent directories of the returned path will be automatically created.
func FromGitRoot ¶
func FromSageDir ¶
FromSageDir returns the path relative to where the sage files are kept.
func FromToolsDir ¶
FromToolsDir returns the path relative to where tools are downloaded and installed. Parent directories of the returned path will be automatically created.
func FromWorkDir ¶
func GenerateMakefiles ¶
func GenerateMakefiles(mks ...Makefile)
GenerateMakefiles defines which Makefiles should be generated.
func Output ¶
Output runs the given command, and returns all output from stdout in a neatly, trimmed manner, panicking if an error occurs.
func SerialDeps ¶
SerialDeps works like Deps except running all dependencies serially instead of in parallel.
Types ¶
type Makefile ¶
type Makefile struct { Namespace interface{} Path string DefaultTarget interface{} }