Documentation
¶
Index ¶
- Variables
- func BudModule() (*gomod.Module, error)
- func CheckGoVersion(currentVersion string) error
- func EnsureVersionAlignment(ctx context.Context, module *gomod.Module, budVersion string) error
- func FileServer(log log.Interface, module *gomod.Module, vm js.VM, flag *framework.Flag) (*overlay.Server, error)
- func FileSystem(ctx context.Context, log log.Interface, module *gomod.Module, ...) (*overlay.FileSystem, func() error, error)
- func Log(stderr io.Writer, logFilter string) (log.Interface, error)
- func Module(dir string) (*gomod.Module, error)
- type Command
- type Input
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMinGoVersion = fmt.Errorf("bud requires Go %s or later", minGoVersion)
ErrMinGoVersion error is returned when Bud needs a newer version of Go
Functions ¶
func CheckGoVersion ¶ added in v0.2.2
CheckGoVersion checks if the current version of Go is greater than the minimum required Go version.
func EnsureVersionAlignment ¶
EnsureVersionAlignment ensures that the CLI and runtime versions are aligned. If they're not aligned, the CLI will correct the go.mod file to align them.
func FileServer ¶
func FileSystem ¶
Types ¶
type Command ¶
type Command struct {
Dir string
Log string
Args []string
Help bool
// contains filtered or unexported fields
}
func (*Command) Run ¶
Run a custom command TODO: finish supporting custom commands
- Compile a. Generate generator (later!) i. Generate bud/internal/generator ii. Build bud/generator iii. Run bud/generator b. Generate custom command i. Generate bud/internal/command/${name}/ ii. Build bud/command/${name}
- Run bud/command/${name}
type Input ¶
type Input struct {
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
Env []string
// Currently passed in only for testing
Dir string // Can be empty
BudLn socket.Listener // Can be nil
WebLn socket.Listener // Can be nil
Bus pubsub.Client // Can be nil
}
Input contains the configuration that gets passed into the commands
Click to show internal directories.
Click to hide internal directories.