Documentation ¶
Overview ¶
Package yb contains some helpers and wraps goyek/goyek/v2.
Index ¶
- Variables
- func ContextWithA(a *A) context.Context
- func ContextWithLogger(ctx context.Context, logger aLogger) context.Context
- func GoDeps(ctx context.Context, name string) []string
- func GoInstall(ctx context.Context, name string, opts ...InstallOption) (bool, error)
- func GoInstallA(a *goyek.A, opts ...InstallOption)
- func GoShouldBuild(ctx context.Context, name string) bool
- func Installed() []string
- func LoggerFromContext(ctx context.Context) aLogger
- func MTime(paths ...string) int64
- func PackageName(path string) (string, error)
- func ReadDirLinks(path string) ([]string, error)
- func ResetInstalled()
- func Run(a *goyek.A, progArgs []string, opts ...RunOption)
- func TemplateIsOld(ctx context.Context, root string, force bool) (string, error)
- type A
- type DefinedTask
- type Deps
- type InstallOption
- type RunOption
- type Task
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Define = goyek.Define Main = boot.Main SetDefault = goyek.SetDefault )
View Source
var (
GoBin = os.Getenv("GOBIN")
)
Functions ¶
func ContextWithA ¶ added in v0.0.5
ContextWithA returns a.Context()
func ContextWithLogger ¶ added in v0.0.5
ComtextWithLogger returns a context with the logger set.
func GoInstallA ¶ added in v0.0.7
func GoInstallA(a *goyek.A, opts ...InstallOption)
GoInstallA is GoInstall for a.Name() with a.Context().
func GoShouldBuild ¶
GoShouldBuild reports whether the given package needs compilation.
func Installed ¶ added in v0.0.7
func Installed() []string
Installed returns the list of succeessfully installed names.
func LoggerFromContext ¶ added in v0.0.5
LoggerFromContext returns the logger from the context, or a default slog logger.
func PackageName ¶ added in v0.0.3
PackageName returns the name of the package at the given path.
func ReadDirLinks ¶
ReadDirLinks reads the links contained at path dir.
func ResetInstalled ¶ added in v0.0.7
func ResetInstalled()
ResetInstalled empties the installed set.
Types ¶
type A ¶
type A = goyek.A
func AFromContext ¶ added in v0.0.5
AFromContext returns A from the Context.
type DefinedTask ¶
type DefinedTask = goyek.DefinedTask
type InstallOption ¶ added in v0.0.12
type InstallOption func(*installParams)
func WithForce ¶ added in v0.0.11
func WithForce(force bool) InstallOption
func WithRace ¶ added in v0.0.11
func WithRace(race bool) InstallOption
Click to show internal directories.
Click to hide internal directories.